diff --git a/api-playground/APIMATIC-BUILD.json b/api-playground/APIMATIC-BUILD.json index fc9c6197b..7946cca52 100644 --- a/api-playground/APIMATIC-BUILD.json +++ b/api-playground/APIMATIC-BUILD.json @@ -3,7 +3,7 @@ "buildFileVersion": "1.0", "generatePortal": { "useHostedPortalScript": false, - "filterByRole": ["9.0.0.cl", "9.2.0.cl", "9.4.0.cl", "9.5.0.cl", "9.6.0.cl", "9.7.0.cl", "9.9.0.cl","9.12.0.cl","10.1.0.cl", "10.3.0.cl", "10.4.0.cl", "10.6.0.cl", "10.7.0.cl", "10.8.0.cl", "10.9.0.cl", "10.10.0.cl", "10.12.0.cl", "10.13.0.cl"], + "filterByRole": ["9.0.0.cl", "9.2.0.cl", "9.4.0.cl", "9.5.0.cl", "9.6.0.cl", "9.7.0.cl", "9.9.0.cl","9.12.0.cl","10.1.0.cl", "10.3.0.cl", "10.4.0.cl", "10.6.0.cl", "10.7.0.cl", "10.8.0.cl", "10.9.0.cl", "10.10.0.cl", "10.12.0.cl", "10.13.0.cl", "10.14.0.cl"], "pageTitle": "ThoughtSpot Public Rest APIs", "languageConfig": { "http": {} @@ -84,3 +84,4 @@ } } + 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..71827750c --- /dev/null +++ b/api-playground/api-playground-config.json @@ -0,0 +1,6 @@ +{ + "hideApiFields": [ + { "operationId": "getFullAccessToken", "fields": ["user_parameters"] }, + { "operationId": "getObjectAccessToken", "fields": ["user_parameters"] } + ] +} \ No newline at end of file diff --git a/api-playground/build.sh b/api-playground/build.sh index ae092c53b..8b34a1ad7 100644 --- a/api-playground/build.sh +++ b/api-playground/build.sh @@ -7,6 +7,10 @@ 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 . 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/js/embedded.js b/api-playground/static/js/embedded.js index 54e6c5541..9c4945a33 100644 --- a/api-playground/static/js/embedded.js +++ b/api-playground/static/js/embedded.js @@ -83,17 +83,18 @@ const setPlaygroundConfig = ({ baseUrl, accessToken }) => { if(isApiMaticPortalReady) { _setConfig((defaultConfig) => { return { - ...defaultConfig, - showFullCode: false, + // ...defaultConfig, + showFullCode: false, auth: { bearerAuth: { AccessToken: accessToken, }, }, config: { - ...defaultConfig.config, + // ...defaultConfig.config, "base-url": baseUrl, }, + environment: "production", }; }); } diff --git a/api-spec/openapiSpecv3-2_0.json b/api-spec/openapiSpecv3-2_0.json index d295422bc..367af5c4c 100644 --- a/api-spec/openapiSpecv3-2_0.json +++ b/api-spec/openapiSpecv3-2_0.json @@ -141,6 +141,14 @@ ], "description": "Roles for version 9.5.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", @@ -595,6 +603,91 @@ } } }, + "/api/rest/2.0/ai/agent/{conversation_identifier}/converse": { + "post": { + "operationId": "sendAgentMessage", + "description": "\nBeta Version: 10.13.0.cl or later\n\nThis API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. \nTo use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message.\n\n\n#### Usage guidelines\n\nTo initiate or continue a conversation, the request must include:\n- `conversation_identifier`: a unique session ID for continuity and message tracking\n- `messages`: an array of one or more text messages, each with a value and type\n\nThe API returns a array of object with a type, message, and metadata.\n- `type`: Type of the message — text, answer, or error.\n- `message`: Main content of the response.\n- `metadata`: Additional info depending on the message type.\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#### Endpoint URL\n", + "tags": [ + "AI", + "10.13.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "messages": { + "description": "messages to be sent to the agent", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "messages" + ] + } + } + }, + "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": { + "type": "object" + } + } + } + }, + "201": { + "description": "Common error response", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "400": { + "description": "Operation failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Operation failed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, "/api/rest/2.0/ai/agent/converse/sse": { "post": { "operationId": "sendAgentMessageStreaming", @@ -974,7 +1067,7 @@ "/api/rest/2.0/auth/token/custom": { "post": { "operationId": "getCustomAccessToken", - "description": "\n Version: 10.4.0.cl or later\n\nGets an authentication token with custom rules and security attributes and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins.\n\nTo add a new user and assign privileges during auto creation, you need `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. 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 is required.\n\nTo assign security attributes with filter rules and Parameters to the JWT token, you'll need administrator privileges and edit access to the data source (Worksheet or Model). 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 is required.\n\n#### Usage guidelines\n\nYou can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key`.\n\nTo generate a `secret_key` on your cluster, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable) in the **Develop** > **Customizations** > **Security Settings** page.\n\n**Note**: When both `password` and `secret_key` are included in the API request, `password` takes precedence.\n\nIf Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance.\n\n##### Attribute-Based Access Control (ABAC) with tokens\n\nTo implement Attribute-Based Access Control (ABAC) and assign security entitlements to users during session creation, you can generate a token with custom filtering rules and Parameters in the `filter_rules` and `parameter_values` array respectively. These attributes can be configured to persist on a specific set of objects for user sessions initiated using the token. Once defined, the rules are added to the user's `access_control_properties` object, after which all sessions will use the persisted values.\n\nSpecify the object type as `LOGICAL_TABLE`. The `LIVEBOARD` and `ANSWER` object types are not supported.\n\nFor more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/api-authv2#_get_tokens_with_custom_rules_and_filter_conditions).\n\n##### Just-in-time provisioning\n\nFor just-in-time user creation and provisioning, define the following attributes:\n\n* `auto_create`\n* `username`\n* `display_name`\n* `email`\n* `groups`\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` in the API request, the user properties such as the display name, email, Org and group assignment will not be updated with new values.\n\nFor more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning).\n\n##### Important point to note\nAll options in the token creation APIs that define access to the content in ThoughtSpot will do so during the token creation and not when the token is being used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND`, `REPLACE`, `RESET` will persist security parameters on the user profile when the token is created, while Persist option `NONE` will not persist anything but will be honoured in the session.\n\n\n\n\n#### Endpoint URL\n", + "description": "\n Version: 10.4.0.cl or later\n\nGets an authentication token with custom rules and security attributes and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins.\n\nTo add a new user and assign privileges during auto creation, you need `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. 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 is required.\n\nTo assign security attributes with filter rules and Parameters to the JWT token, you'll need administrator privileges and edit access to the data source (Worksheet or Model). 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 is required.\n\n#### Usage guidelines\n\nYou can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key`.\n\nTo generate a `secret_key` on your cluster, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable) in the **Develop** > **Customizations** > **Security Settings** page.\n\n**Note**: When both `password` and `secret_key` are included in the API request, `password` takes precedence.\n\nIf Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance.\n\n##### Attribute-Based Access Control (ABAC) with tokens\n\nTo implement Attribute-Based Access Control (ABAC) and assign security entitlements to users during session creation, you can generate a token with custom filtering rules and Parameters in the `filter_rules` and `parameter_values` array respectively. These attributes can be configured to persist on a specific set of objects for user sessions initiated using the token. Once defined, the rules are added to the user's `access_control_properties` object, after which all sessions will use the persisted values.\n\nSpecify the object type as `LOGICAL_TABLE`. \n\nFor more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/api-authv2#_get_tokens_with_custom_rules_and_filter_conditions).\n\n##### Just-in-time provisioning\n\nFor just-in-time user creation and provisioning, define the following attributes:\n\n* `auto_create`\n* `username`\n* `display_name`\n* `email`\n* `groups`\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` in the API request, the user properties such as the display name, email, Org and group assignment will not be updated with new values. If `auto_create` is set to `true`, it won't create formula variables and hence won't be applicable for `variable_values`.\n\nFor more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning).\n\n##### Important point to note\nAll options in the token creation APIs that define access to the content in ThoughtSpot will do so during the token creation and not when the token is being used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND`, `REPLACE`, `RESET` will persist security parameters on the user profile when the token is created, while Persist option `NONE` will not persist anything but will be honoured in the session.\n\n##### Formula Variables\nBefore using variables_values, variables must be created using Create Variable API with type as Formula_Variable (/api/rest/2.0/template/variables/create)\nThe persist_option RESET and NONE cannot be used when variable_values are provided in the request.\nIf you are working with variable_values, you must use other (APPEND, REPLACE) supported modes.\nIf you want to use RESET or NONE, do not pass any variable_values. In such cases, variable_values will remain unaffected.\nWhen using object_id with variable_values, models are supported. \n\n\n\n#### Endpoint URL\n", "tags": [ "Authentication", "10.4.0.cl" @@ -2852,7 +2945,7 @@ "/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\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 \"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 ```\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#### Endpoint URL\n", + "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 \"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#### Endpoint URL\n", "tags": [ "Connections", "10.4.0.cl" @@ -4627,7 +4720,7 @@ "type": "string" }, "model_tables": { - "description": "List of Models and their respective Tables", + "description": "List of Models and their respective Tables\nExample: '[{\"model_name\": \"model_name\", \"tables\": [\"table_name\"]}]'", "type": "string", "format": "json" }, @@ -4641,7 +4734,7 @@ ] }, "worksheets": { - "description": "List of worksheets is mandatory when import_Worksheets is type SELECTED", + "description": "List of worksheets is mandatory when import_Worksheets is type SELECTED\nExample: [\"worksheet_name\"]", "type": "string", "format": "json" }, @@ -4653,6 +4746,7 @@ }, "required": [ "dbt_connection_identifier", + "model_tables", "import_worksheets" ] } @@ -5455,6 +5549,8 @@ "ALLOW_NON_EMBED_FULL_APP_ACCESS", "CAN_ACCESS_ANALYST_STUDIO", "CAN_MANAGE_ANALYST_STUDIO", + "CAN_MODIFY_FOLDERS", + "CAN_VIEW_FOLDERS", "PREVIEW_DOCUMENT_SEARCH", "CAN_SETUP_VERSION_CONTROL", "CAN_DOWNLOAD_VISUALS", @@ -5813,6 +5909,8 @@ "CAN_ACCESS_ANALYST_STUDIO", "CAN_MANAGE_ANALYST_STUDIO", "PREVIEW_DOCUMENT_SEARCH", + "CAN_MODIFY_FOLDERS", + "CAN_VIEW_FOLDERS", "CAN_SETUP_VERSION_CONTROL", "CAN_MANAGE_WEBHOOKS", "CAN_DOWNLOAD_VISUALS", @@ -6019,6 +6117,8 @@ "ALLOW_NON_EMBED_FULL_APP_ACCESS", "CAN_ACCESS_ANALYST_STUDIO", "CAN_MANAGE_ANALYST_STUDIO", + "CAN_MODIFY_FOLDERS", + "CAN_VIEW_FOLDERS", "PREVIEW_DOCUMENT_SEARCH", "CAN_SETUP_VERSION_CONTROL", "CAN_DOWNLOAD_VISUALS", @@ -6347,7 +6447,7 @@ "/api/rest/2.0/metadata/copyobject": { "post": { "operationId": "copyObject", - "description": "\nMakes a copy of an Answer or Liveboard saved in Atlas
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", + "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" @@ -8664,6 +8764,8 @@ "CAN_ACCESS_ANALYST_STUDIO", "CAN_MANAGE_ANALYST_STUDIO", "PREVIEW_DOCUMENT_SEARCH", + "CAN_MODIFY_FOLDERS", + "CAN_VIEW_FOLDERS", "CAN_SETUP_VERSION_CONTROL", "PREVIEW_THOUGHTSPOT_SAGE", "CAN_MANAGE_WEBHOOKS", @@ -8892,6 +8994,8 @@ "ALLOW_NON_EMBED_FULL_APP_ACCESS", "CAN_ACCESS_ANALYST_STUDIO", "CAN_MANAGE_ANALYST_STUDIO", + "CAN_VIEW_FOLDERS", + "CAN_MODIDY_FOLDERS", "PREVIEW_DOCUMENT_SEARCH", "CAN_SETUP_VERSION_CONTROL", "CAN_MANAGE_WEBHOOKS", @@ -9052,6 +9156,8 @@ "CAN_CREATE_CATALOG", "CAN_ACCESS_ANALYST_STUDIO", "CAN_MANAGE_ANALYST_STUDIO", + "CAN_MODIFY_FOLDERS", + "CAN_VIEW_FOLDERS", "PREVIEW_DOCUMENT_SEARCH", "PREVIEW_THOUGHTSPOT_SAGE", "CAN_MANAGE_WEBHOOKS", @@ -11805,6 +11911,88 @@ } } }, + "/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": { + "type": "object", + "properties": { + "cluster_preferences": { + "description": "Cluster-level default configurations.", + "type": "array", + "items": { + "$ref": "#/components/schemas/EventChannelConfigInput" + } + }, + "org_preferences": { + "description": "Org-specific configurations.", + "type": "array", + "items": { + "$ref": "#/components/schemas/OrgChannelConfigInput" + } + } + } + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Communication channel preferences 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/system/config": { "get": { "operationId": "getSystemConfig", @@ -12030,6 +12218,128 @@ } } }, + "/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": { + "type": "object", + "properties": { + "cluster_preferences": { + "description": "Event types to search for in cluster-level preferences.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "LIVEBOARD_SCHEDULE" + ] + } + }, + "org_preferences": { + "description": "Org-specific search criteria.", + "type": "array", + "items": { + "$ref": "#/components/schemas/OrgPreferenceSearchCriteriaInput" + } + } + } + } + } + }, + "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" + } + } + } + }, + "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/system/config-update": { "post": { "operationId": "updateSystemConfig", @@ -13557,6 +13867,8 @@ "CAN_ACCESS_ANALYST_STUDIO", "CAN_MANAGE_ANALYST_STUDIO", "PREVIEW_DOCUMENT_SEARCH", + "CAN_MODIFY_FOLDERS", + "CAN_VIEW_FOLDERS", "CAN_SETUP_VERSION_CONTROL", "CAN_MANAGE_WEBHOOKS", "CAN_DOWNLOAD_VISUALS", @@ -13932,10 +14244,10 @@ "/api/rest/2.0/template/variables/create": { "post": { "operationId": "createVariable", - "description": "\nCreate a variable which can be used for parameterizing metadata objects
Beta Version: 10.9.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.\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\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 fomula 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", + "description": "\nCreate a variable which can be used for parameterizing metadata objects
Beta Version: 10.14.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\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 fomula 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", - "10.9.0.cl" + "10.14.0.cl" ], "requestBody": { "content": { @@ -13956,18 +14268,23 @@ "description": "Name of the variable. This is unique across the cluster.", "type": "string" }, - "sensitive": { + "is_sensitive": { "description": "If the variable contains sensitive values like passwords", "default": false, "type": "boolean", "nullable": true }, - "values": { - "description": "Values of variable", - "type": "array", - "items": { - "$ref": "#/components/schemas/InputVariableValue" - } + "data_type": { + "description": "Variable Data Type", + "type": "string", + "enum": [ + "VARCHAR", + "INT32", + "INT64", + "DOUBLE", + "DATE", + "DATE_TIME" + ] } }, "required": [ @@ -14037,10 +14354,10 @@ "/api/rest/2.0/template/variables/{identifier}/delete": { "post": { "operationId": "deleteVariable", - "description": "\nDelete a variable
Beta Version: 10.9.0.cl or later\n\nAllows deleting a variable from ThoughtSpot.\n\nRequires ADMINISTRATION role and TENANT 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", + "description": "\nDelete a variable
Beta Version: 10.14.0.cl or later\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", "tags": [ "Variable", - "10.9.0.cl" + "10.14.0.cl" ], "parameters": [ { @@ -14103,10 +14420,10 @@ "/api/rest/2.0/template/variables/search": { "post": { "operationId": "searchVariables", - "description": "\nSearch variables
Beta Version: 10.9.0.cl or later\n\nAllows searching for variables in ThoughtSpot.\n\nRequires ADMINISTRATION role.\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_ONLY - Returns only variable metadata (default)\n* METADATA_AND_VALUES - Returns variable metadata and values\n* EDITABLE_METADATA_AND_VALUES - Returns only editable 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", + "description": "\nSearch variables
Beta Version: 10.14.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", - "10.9.0.cl" + "10.14.0.cl" ], "requestBody": { "content": { @@ -14121,6 +14438,13 @@ "$ref": "#/components/schemas/VariableDetailInput" } }, + "value_scope": { + "description": "Array of scope filters", + "type": "array", + "items": { + "$ref": "#/components/schemas/ValueScopeInput" + } + }, "record_offset": { "description": "The starting record number from where the records should be included", "default": 0, @@ -14139,8 +14463,7 @@ "type": "string", "enum": [ "METADATA_ONLY", - "METADATA_AND_VALUES", - "EDITABLE_METADATA_AND_VALUES" + "METADATA_AND_VALUES" ] } } @@ -14210,10 +14533,10 @@ "/api/rest/2.0/template/variables/{identifier}/update": { "post": { "operationId": "updateVariable", - "description": "\nUpdate a variable's properties
Beta Version: 10.9.0.cl or later\n\nAllows updating a variable's properties in ThoughtSpot.\n\nRequires ADMINISTRATION role and TENANT scope.\n\nThe API endpoint allows updating:\n* The variable name\n\n\n\n#### Endpoint URL\n", + "description": "\nUpdate a variable's name
Beta Version: 10.14.0.cl or later\n\nAllows updating a variable's properties 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", - "10.9.0.cl" + "10.14.0.cl" ], "requestBody": { "content": { @@ -14222,27 +14545,13 @@ "type": "object", "properties": { "name": { - "description": "New name of the variable if we want to rename.", + "description": "New name of the variable.", "type": "string" - }, - "operation": { - "description": "Operation to perform on the values.", - "default": "REPLACE", - "type": "string", - "enum": [ - "ADD", - "REMOVE", - "REPLACE" - ] - }, - "values": { - "description": "Values of variable to be updated.", - "type": "array", - "items": { - "$ref": "#/components/schemas/InputVariableValue" - } } - } + }, + "required": [ + "name" + ] } } }, @@ -14261,7 +14570,7 @@ ], "responses": { "204": { - "description": "Updating the variable is successful." + "description": "Variable name updated successfully." }, "400": { "description": "Invalid request.", @@ -14306,13 +14615,13 @@ } } }, - "/api/rest/2.0/template/variables/update": { + "/api/rest/2.0/template/variables/update-values": { "post": { "operationId": "updateVariableValues", - "description": "\nUpdate values for multiple variables
Beta Version: 10.9.0.cl or later\n\nAllows updating values for multiple variables in ThoughtSpot.\n\nRequires ADMINISTRATION role.\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, CLEAR)\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* CLEAR - Removes all constrains for a given variable, scope is ignored\n\n\n\n\n#### Endpoint URL\n", + "description": "\nUpdate values for multiple variables
Beta Version: 10.14.0.cl or later\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, CLEAR)\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* CLEAR - Removes all constrains for a given variable, scope is ignored\n\n\n\n\n#### Endpoint URL\n", "tags": [ "Variable", - "10.9.0.cl" + "10.14.0.cl" ], "requestBody": { "content": { @@ -14320,26 +14629,24 @@ "schema": { "type": "object", "properties": { - "variable_updates": { - "description": "Variables and values", + "variable_assignment": { + "description": "Variables and values to update", "type": "array", "items": { - "$ref": "#/components/schemas/VariableValueInput" + "$ref": "#/components/schemas/VariableUpdateAssignmentInput" } }, - "operation": { - "description": "Type of update operation", - "type": "string", - "enum": [ - "ADD", - "REMOVE", - "REPLACE" - ] + "variable_value_scope": { + "description": "Variables and values to update", + "type": "array", + "items": { + "$ref": "#/components/schemas/VariableUpdateScopeInput" + } } }, "required": [ - "variable_updates", - "operation" + "variable_assignment", + "variable_value_scope" ] } } @@ -14349,7 +14656,7 @@ "parameters": [], "responses": { "204": { - "description": "Updating variable values is successful." + "description": "Variable values updated successfully." }, "400": { "description": "Invalid request.", @@ -15287,104 +15594,795 @@ } } } - } - }, - "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" + }, + "/api/rest/2.0/webhooks/create": { + "post": { + "operationId": "createWebhookConfiguration", + "description": "\nBeta 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" ], - "properties": { - "token": { - "type": "string", - "description": "Bearer auth token." + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "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.", + "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" + } + ] + } + }, + "required": [ + "name", + "url", + "events" + ] + } + } }, - "creation_time_in_millis": { - "type": "number", - "format": "float", - "description": "Token creation time in milliseconds." + "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": "***" + }, + "created_at": "2025-08-21T21:57:10.243089030Z", + "last_modified_at": "2025-08-21T21:57:10.243089030Z", + "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": "***" + } + }, + "created_at": "2025-08-21T22:15:30.123456789Z", + "last_modified_at": "2025-08-21T22:15:30.123456789Z", + "created_by": { + "id": "7d5e9f2a-4b8c-4d6e-9a3b-5c7e1f4a8b2d", + "name": "mike_rodriguez" + } + } + } + } + } + } }, - "expiration_time_in_millis": { - "type": "number", - "format": "float", - "description": "Token expiration time in milliseconds." + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, - "valid_for_user_id": { - "type": "string", - "description": "Username to whom the token is issued." + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, - "valid_for_username": { - "type": "string", - "description": "Unique identifier of the user to whom the token is issued." - } - } - }, - "RiseSetter": { - "type": "object", - "required": [ - "field", - "path" - ], - "properties": { - "field": { - "type": "string" + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, - "path": { - "type": "string" + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } } - }, - "User": { - "type": "object", - "required": [ - "id", - "name", - "display_name", - "visibility" + } + }, + "/api/rest/2.0/webhooks/delete": { + "post": { + "operationId": "deleteWebhookConfigurations", + "description": "\nBeta 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" ], - "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 + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "webhook_identifiers": { + "description": "List of webhook identifiers to delete.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "webhook_identifiers" + ] + } + } }, - "can_change_password": { - "type": "boolean", + "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": "***" + }, + "created_at": "2025-08-21T15:30:00.000000000Z", + "last_modified_at": "2025-08-21T15:30:00.000000000Z", + "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": "***" + } + }, + "created_at": "2025-08-21T16:45:30.123456789Z", + "last_modified_at": "2025-08-21T16:45:30.123456789Z", + "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": "" + }, + "created_at": "2025-08-21T18:20:15.456789012Z", + "last_modified_at": "2025-08-21T18:20:15.456789012Z", + "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" + } + ] + } + } + } + } + } + }, + "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/search": { + "post": { + "operationId": "searchWebhookConfigurations", + "description": "\nBeta 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": { + "type": "object", + "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.", + "type": "string", + "enum": [ + "LIVEBOARD_SCHEDULE" + ] + }, + "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" + } + ] + } + } + } + } + }, + "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": "***" + }, + "created_at": "2025-08-21T21:57:10.243089030Z", + "last_modified_at": "2025-08-21T22:10:15.123456789Z", + "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": "***" + } + }, + "created_at": "2025-08-21T20:30:45.987654321Z", + "last_modified_at": "2025-08-21T20:30:45.987654321Z", + "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" + } + } + } + }, + "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/{webhook_identifier}/update": { + "post": { + "operationId": "updateWebhookConfiguration", + "description": "\nBeta 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": { + "type": "object", + "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.", + "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" + } + ] + } + } + } + } + }, + "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" + } + } + } + }, + "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" + } + } + } + } + } + } + } + }, + "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." + } + } + }, + "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 }, @@ -15624,6 +16622,11 @@ "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 } } }, @@ -15855,29 +16858,137 @@ "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.", + "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 + } + } + }, + "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 } } }, - "SystemConfig": { + "EventChannelConfig": { "type": "object", + "required": [ + "event_type", + "channels" + ], "properties": { - "onboarding_content_url": { + "event_type": { "type": "string", - "nullable": true + "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." } } }, - "SystemOverrideInfo": { + "OrgChannelConfigResponse": { "type": "object", + "required": [ + "org", + "preferences" + ], "properties": { - "config_override_info": { - "type": "object", - "nullable": true + "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" } } }, @@ -17122,17 +18233,17 @@ "ColumnSecurityRuleResponse": { "type": "object", "properties": { - "guid": { + "table_guid": { "type": "string", "description": "GUID of the table for which the column security rules are fetched", "nullable": true }, - "objId": { + "obj_id": { "type": "string", "description": "Object ID of the table for which the column security rules are fetched", "nullable": true }, - "columnSecurityRules": { + "column_security_rules": { "type": "array", "items": { "$ref": "#/components/schemas/ColumnSecurityRule" @@ -17160,7 +18271,7 @@ "description": "Array of groups that have access to this column", "nullable": true }, - "sourceTableDetails": { + "source_table_details": { "$ref": "#/components/schemas/ColumnSecurityRuleSourceTable", "description": "Information about the source table", "nullable": true @@ -17915,6 +19026,8 @@ "ALLOW_NON_EMBED_FULL_APP_ACCESS", "CAN_ACCESS_ANALYST_STUDIO", "CAN_MANAGE_ANALYST_STUDIO", + "CAN_VIEW_FOLDERS", + "CAN_MODIDY_FOLDERS", "PREVIEW_DOCUMENT_SEARCH", "CAN_SETUP_VERSION_CONTROL", "CAN_MANAGE_WEBHOOKS", @@ -18495,6 +19608,36 @@ }, "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": "Principal type", + "nullable": true + }, + "principal_identifier": { + "type": "string", + "description": "Unique ID or name of the principal", + "nullable": true + }, + "model_identifier": { + "type": "string", + "description": "Model Identifier", + "nullable": true + } + }, + "description": "Input for variable scope in search" + }, "Variable": { "type": "object", "required": [ @@ -18547,6 +19690,14 @@ "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" @@ -18720,33 +19871,337 @@ "FALCON_ONPREM", "CLICKHOUSE" ], - "nullable": true + "nullable": true + }, + "policy_type": { + "type": "string", + "enum": [ + "NO_POLICY", + "PRINCIPALS", + "PROCESSES" + ], + "nullable": true + } + } + }, + "UserPrincipal": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + } + } + }, + "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 + }, + "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 + } + } + }, + "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." }, - "policy_type": { + "header": { + "type": "string", + "description": "HTTP header where the signature is sent." + }, + "algorithm": { "type": "string", "enum": [ - "NO_POLICY", - "PRINCIPALS", - "PROCESSES" + "SHA256" ], - "nullable": true + "description": "Hash algorithm used for signature verification." + }, + "secret": { + "type": "string", + "description": "Shared secret used for HMAC signature generation." } } }, - "UserPrincipal": { + "WebhookUser": { "type": "object", + "required": [ + "id", + "name" + ], "properties": { "id": { "type": "string", - "nullable": true + "description": "Unique identifier of the user." }, "name": { "type": "string", - "nullable": true + "description": "Name of the user." + } + } + }, + "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." }, - "type": { - "type": "string", - "nullable": true + "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." } } }, @@ -18890,7 +20345,7 @@ "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`. The `LIVEBOARD` and `ANSWER` object types are not supported.", + "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": { @@ -19232,7 +20687,7 @@ "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`. The `LIVEBOARD` and `ANSWER` object types are not supported.", + "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": { @@ -19488,6 +20943,74 @@ } } }, + "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 + } + } + }, "TagMetadataTypeInput": { "type": "object", "required": [ @@ -19570,6 +21093,8 @@ "ALLOW_NON_EMBED_FULL_APP_ACCESS", "CAN_ACCESS_ANALYST_STUDIO", "CAN_MANAGE_ANALYST_STUDIO", + "CAN_MODIFY_FOLDERS", + "CAN_VIEW_FOLDERS", "PREVIEW_DOCUMENT_SEARCH", "CAN_SETUP_VERSION_CONTROL", "CAN_DOWNLOAD_VISUALS", @@ -19680,6 +21205,12 @@ "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." @@ -20553,6 +22084,8 @@ "CAN_ACCESS_ANALYST_STUDIO", "CAN_MANAGE_ANALYST_STUDIO", "PREVIEW_DOCUMENT_SEARCH", + "CAN_MODIFY_FOLDERS", + "CAN_VIEW_FOLDERS", "CAN_SETUP_VERSION_CONTROL", "PREVIEW_THOUGHTSPOT_SAGE", "CAN_MANAGE_WEBHOOKS", @@ -21705,17 +23238,44 @@ } } }, - "InputVariableValue": { + "VariableUpdateAssignmentInput": { "type": "object", "required": [ - "value", - "org_identifier" + "variable_identifier", + "variable_values", + "operation" ], "properties": { - "value": { + "variable_identifier": { "type": "string", - "description": "The connection property value" + "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", + "CLEAR" + ], + "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" @@ -21734,34 +23294,19 @@ "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": "The priority assigned to this value. If there are 2 matching values, the one with the higher priority will be picked.", + "description": "Priority level", "nullable": true } - } - }, - "VariableValueInput": { - "type": "object", - "required": [ - "variable_identifier", - "variable_values" - ], - "properties": { - "variable_identifier": { - "type": "string", - "description": "ID or Name of the variable" - }, - "variable_values": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InputVariableValue" - }, - "description": "Values of the variable" - } }, - "description": "Input for variable value update" + "description": "Input for variable value update in batch operations" }, "CreateEmailCustomizationResponse": { "type": "object", @@ -21964,6 +23509,177 @@ } } }, + "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." + } + } + }, + "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." + } + } + }, "Runtime_Filter": { "type": "object", "properties": { diff --git a/sdks/java/.openapi-generator/FILES b/sdks/java/.openapi-generator/FILES index f1a94dadf..06cc6e9d6 100644 --- a/sdks/java/.openapi-generator/FILES +++ b/sdks/java/.openapi-generator/FILES @@ -52,6 +52,8 @@ docs/CommitFileType.md docs/CommitHistoryResponse.md docs/CommitResponse.md docs/CommiterType.md +docs/CommunicationChannelPreferencesResponse.md +docs/ConfigureCommunicationChannelPreferencesRequest.md docs/ConnectionConfigurationResponse.md docs/ConnectionConfigurationSearchRequest.md docs/ConnectionConfigurationsApi.md @@ -79,6 +81,7 @@ docs/CreateTagRequest.md docs/CreateUserGroupRequest.md docs/CreateUserRequest.md docs/CreateVariableRequest.md +docs/CreateWebhookConfigurationRequest.md docs/CronExpression.md docs/CronExpressionInput.md docs/CustomActionApi.md @@ -103,6 +106,7 @@ docs/DeleteConnectionRequest.md docs/DeleteMetadataRequest.md docs/DeleteMetadataTypeInput.md docs/DeleteOrgEmailCustomizationRequest.md +docs/DeleteWebhookConfigurationsRequest.md docs/DeployCommitRequest.md docs/DeployResponse.md docs/EmailCustomizationApi.md @@ -114,6 +118,8 @@ docs/EurekaGetRelevantQuestionsResponse.md docs/EurekaLLMDecomposeQueryResponse.md docs/EurekaLLMSuggestedQuery.md docs/EurekaRelevantQuestion.md +docs/EventChannelConfig.md +docs/EventChannelConfigInput.md docs/ExcludeMetadataListItemInput.md docs/ExportAnswerReportRequest.md docs/ExportLiveboardReportRequest.md @@ -163,7 +169,6 @@ docs/ImportUserType.md docs/ImportUsersRequest.md docs/ImportUsersResponse.md docs/InputEurekaNLSRequest.md -docs/InputVariableValue.md docs/JWTMetadataObject.md docs/JWTParameter.md docs/JWTUserOptions.md @@ -188,7 +193,11 @@ docs/MetadataSearchSortOptions.md docs/ModelTableList.md docs/ObjectIDAndName.md docs/Org.md +docs/OrgChannelConfigInput.md +docs/OrgChannelConfigResponse.md +docs/OrgDetails.md docs/OrgInfo.md +docs/OrgPreferenceSearchCriteriaInput.md docs/OrgResponse.md docs/OrgType.md docs/OrgsApi.md @@ -252,6 +261,7 @@ docs/SchemaObject.md docs/Scope.md docs/SearchCalendarsRequest.md docs/SearchCommitsRequest.md +docs/SearchCommunicationChannelPreferencesRequest.md docs/SearchConfigRequest.md docs/SearchConnectionRequest.md docs/SearchConnectionResponse.md @@ -268,7 +278,9 @@ docs/SearchTagsRequest.md docs/SearchUserGroupsRequest.md docs/SearchUsersRequest.md docs/SearchVariablesRequest.md +docs/SearchWebhookConfigurationsRequest.md docs/SecurityApi.md +docs/SendAgentMessageRequest.md docs/SendAgentMessageResponse.md docs/SendAgentMessageStreamingRequest.md docs/SendMessageRequest.md @@ -320,6 +332,7 @@ docs/UpdateUserGroupRequest.md docs/UpdateUserRequest.md docs/UpdateVariableRequest.md docs/UpdateVariableValuesRequest.md +docs/UpdateWebhookConfigurationRequest.md docs/User.md docs/UserGroup.md docs/UserGroupResponse.md @@ -330,12 +343,33 @@ docs/UserPrincipal.md docs/UsersApi.md docs/ValidateMergeRequest.md docs/ValidateTokenRequest.md +docs/ValueScopeInput.md docs/Variable.md docs/VariableApi.md docs/VariableDetailInput.md +docs/VariableUpdateAssignmentInput.md +docs/VariableUpdateScopeInput.md docs/VariableValue.md -docs/VariableValueInput.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/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 @@ -387,6 +421,7 @@ 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 @@ -437,6 +472,8 @@ 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/ConfigureCommunicationChannelPreferencesRequest.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 @@ -462,6 +499,7 @@ 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/CustomActionMetadataTypeInput.java @@ -482,6 +520,7 @@ 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/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 @@ -492,6 +531,8 @@ src/main/java/com/thoughtspot/client/model/EurekaGetRelevantQuestionsResponse.ja 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/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 @@ -540,7 +581,6 @@ 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/InputVariableValue.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 @@ -563,7 +603,11 @@ 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/ObjectIDAndName.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/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 @@ -623,6 +667,7 @@ 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/SearchCalendarsRequest.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 @@ -639,6 +684,8 @@ 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/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 @@ -687,6 +734,7 @@ 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 @@ -696,10 +744,30 @@ 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/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/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/VariableValueInput.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/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/ConnectionConfigurationsApiTest.java @@ -723,6 +791,7 @@ 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 @@ -768,6 +837,8 @@ 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/ConfigureCommunicationChannelPreferencesRequestTest.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 @@ -793,6 +864,7 @@ 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/CustomActionMetadataTypeInputTest.java @@ -813,6 +885,7 @@ 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/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 @@ -823,6 +896,8 @@ src/test/java/com/thoughtspot/client/model/EurekaGetRelevantQuestionsResponseTes 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/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 @@ -871,7 +946,6 @@ 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/InputVariableValueTest.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 @@ -893,7 +967,11 @@ 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/ObjectIDAndNameTest.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/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 @@ -954,6 +1032,7 @@ 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/SearchCalendarsRequestTest.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 @@ -970,6 +1049,8 @@ 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/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 @@ -1018,6 +1099,7 @@ 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 @@ -1027,8 +1109,28 @@ 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/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/VariableTest.java -src/test/java/com/thoughtspot/client/model/VariableValueInputTest.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/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/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/README.md b/sdks/java/README.md index 2dbf573bd..7fc480fbc 100644 --- a/sdks/java/README.md +++ b/sdks/java/README.md @@ -14,7 +14,7 @@ Add this dependency to your project's POM: com.thoughtspot rest-api-sdk - 2.18.0 + 2.19.0 compile ``` @@ -29,7 +29,7 @@ Add this dependency to your project's build file: } dependencies { - implementation "com.thoughtspot:rest-api-sdk:2.18.0" + implementation "com.thoughtspot:rest-api-sdk:2.19.0" } ``` diff --git a/sdks/java/api/openapi.yaml b/sdks/java/api/openapi.yaml index d13090aa3..e43a25c6a 100644 --- a/sdks/java/api/openapi.yaml +++ b/sdks/java/api/openapi.yaml @@ -307,6 +307,70 @@ paths: x-content-type: application/json x-accepts: - application/json + /api/rest/2.0/ai/agent/{conversation_identifier}/converse: + post: + description: "\nVersion: 10.13.0.cl or later\n\n\nThis API allows users to initiate\ + \ or continue an agent (Spotter) conversation by submitting one or more natural\ + \ language messages. \nTo use this API, the user must have access to the relevant\ + \ conversational session (via conversation_identifier) and submit at least\ + \ one message.\n\n\n#### Usage guidelines\n\nTo initiate or continue a conversation,\ + \ the request must include:\n- `conversation_identifier`: a unique session\ + \ ID for continuity and message tracking\n- `messages`: an array of one or\ + \ more text messages, each with a value and type\n\nThe API returns a array\ + \ of object with a type, message, and metadata.\n- `type`: Type of the message\ + \ — text, answer, or error.\n- `message`: Main content of the response.\n\ + - `metadata`: Additional info depending on the message type.\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" + 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/sendAgentMessage_request' + 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 + "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: description: "\nVersion: 10.13.0.cl or later\n\n\nThis API allows users to initiate\ @@ -614,56 +678,62 @@ paths: - application/json /api/rest/2.0/auth/token/custom: post: - description: |2+ - - Version: 10.4.0.cl or later - - - Gets an authentication token with custom rules and security attributes and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. - - To add a new user and assign privileges during auto creation, you need `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. 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 is required. - - To assign security attributes with filter rules and Parameters to the JWT token, you'll need administrator privileges and edit access to the data source (Worksheet or Model). 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 is required. - - #### Usage guidelines - - You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key`. - - To generate a `secret_key` on your cluster, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable) 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) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. - - ##### Attribute-Based Access Control (ABAC) with tokens - - To implement Attribute-Based Access Control (ABAC) and assign security entitlements to users during session creation, you can generate a token with custom filtering rules and Parameters in the `filter_rules` and `parameter_values` array respectively. These attributes can be configured to persist on a specific set of objects for user sessions initiated using the token. Once defined, the rules are added to the user's `access_control_properties` object, after which all sessions will use the persisted values. - - Specify the object type as `LOGICAL_TABLE`. The `LIVEBOARD` and `ANSWER` object types are not supported. - - For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/api-authv2#_get_tokens_with_custom_rules_and_filter_conditions). - - ##### Just-in-time provisioning - - For just-in-time user creation and provisioning, define the following attributes: - - * `auto_create` - * `username` - * `display_name` - * `email` - * `groups` - - 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` in the API request, the user properties such as the display name, email, Org and group assignment will not be updated with new values. - - For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). - - ##### Important point to note - All options in the token creation APIs that define access to the content in ThoughtSpot will do so during the token creation and not when the token is being used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND`, `REPLACE`, `RESET` will persist security parameters on the user profile when the token is created, while Persist option `NONE` will not persist anything but will be honoured in the session. - - - - - + description: "\n Version: 10.4.0.cl or later\n\n\nGets an authentication token\ + \ with custom rules and security attributes and creates a full session in\ + \ ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot\ + \ remains valid for 5 mins.\n\nTo add a new user and assign privileges during\ + \ auto creation, you need `ADMINISTRATION` (**Can administer ThoughtSpot**)\ + \ privilege. 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 is required.\n\nTo assign security\ + \ attributes with filter rules and Parameters to the JWT token, you'll need\ + \ administrator privileges and edit access to the data source (Worksheet or\ + \ Model). 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 is required.\n\n#### Usage\ + \ guidelines\n\nYou can generate the token for a user by providing a `username`\ + \ and `password`, or by using the cluster’s `secret_key`.\n\nTo generate a\ + \ `secret_key` on your cluster, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable)\ + \ in the **Develop** > **Customizations** > **Security Settings** page.\n\n\ + **Note**: When both `password` and `secret_key` are included in the API request,\ + \ `password` takes precedence.\n\nIf Multi-Factor Authentication (MFA) is\ + \ enabled on your instance, the API login request with basic authentication\ + \ (`username` and `password` ) returns an error. You can switch to token-based\ + \ authentication with `secret_key` or contact ThoughtSpot Support for assistance.\n\ + \n##### Attribute-Based Access Control (ABAC) with tokens\n\nTo implement\ + \ Attribute-Based Access Control (ABAC) and assign security entitlements to\ + \ users during session creation, you can generate a token with custom filtering\ + \ rules and Parameters in the `filter_rules` and `parameter_values` array\ + \ respectively. These attributes can be configured to persist on a specific\ + \ set of objects for user sessions initiated using the token. Once defined,\ + \ the rules are added to the user's `access_control_properties` object, after\ + \ which all sessions will use the persisted values.\n\nSpecify the object\ + \ type as `LOGICAL_TABLE`. \n\nFor more information, see [ABAC via tokens\ + \ Documentation](https://developers.thoughtspot.com/docs/api-authv2#_get_tokens_with_custom_rules_and_filter_conditions).\n\ + \n##### Just-in-time provisioning\n\nFor just-in-time user creation and provisioning,\ + \ define the following attributes:\n\n* `auto_create`\n* `username`\n* `display_name`\n\ + * `email`\n* `groups`\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` in the API request, the user properties such\ + \ as the display name, email, Org and group assignment will not be updated\ + \ with new values. If `auto_create` is set to `true`, it won't create formula\ + \ variables and hence won't be applicable for `variable_values`.\n\nFor more\ + \ information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning).\n\ + \n##### Important point to note\nAll options in the token creation APIs that\ + \ define access to the content in ThoughtSpot will do so during the token\ + \ creation and not when the token is being used for authentication. For example,\ + \ `auto_create:true` will create the user when the authentication token is\ + \ created. Persist options such as `APPEND`, `REPLACE`, `RESET` will persist\ + \ security parameters on the user profile when the token is created, while\ + \ Persist option `NONE` will not persist anything but will be honoured in\ + \ the session.\n\n##### Formula Variables\nBefore using variables_values,\ + \ variables must be created using Create Variable API with type as Formula_Variable\ + \ (/api/rest/2.0/template/variables/create)\nThe persist_option RESET and\ + \ NONE cannot be used when variable_values are provided in the request.\n\ + If you are working with variable_values, you must use other (APPEND, REPLACE)\ + \ supported modes.\nIf you want to use RESET or NONE, do not pass any variable_values.\ + \ In such cases, variable_values will remain unaffected.\nWhen using object_id\ + \ with variable_values, models are supported. \n\n\n\n\n" operationId: getCustomAccessToken parameters: [] requestBody: @@ -1885,46 +1955,102 @@ paths: \ 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\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 \"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 ```\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" + \ 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. @@ -4129,11 +4255,11 @@ paths: - application/json /api/rest/2.0/metadata/copyobject: post: - description: "\nMakes a copy of an Answer or Liveboard saved in Atlas \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" + 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: @@ -6575,6 +6701,64 @@ paths: 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/configureCommunicationChannelPreferences_request' + 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/config: get: description: |2+ @@ -6755,6 +6939,83 @@ paths: - 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/searchCommunicationChannelPreferences_request' + 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/config-update: post: description: |2+ @@ -7832,11 +8093,12 @@ paths: /api/rest/2.0/template/variables/create: post: description: "\nCreate a variable which can be used for parameterizing metadata\ - \ objects \n Version: 10.9.0.cl or later\n\n\nAllows creating a variable which\ - \ can be used for parameterizing metadata objects in ThoughtSpot.\n\nRequires\ - \ ADMINISTRATION role and TENANT 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\ + \ objects \n Version: 10.14.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\n\n\ When creating a variable, you need to specify:\n* The variable type\n* A unique\ @@ -7892,12 +8154,13 @@ paths: - application/json /api/rest/2.0/template/variables/{identifier}/delete: post: - description: "\nDelete a variable \n Version: 10.9.0.cl or later\n\n\nAllows\ + description: "\nDelete a variable \n Version: 10.14.0.cl or later\n\n\nAllows\ \ deleting a variable from ThoughtSpot.\n\nRequires ADMINISTRATION role and\ - \ TENANT 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" + \ 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 @@ -7942,16 +8205,16 @@ paths: - application/json /api/rest/2.0/template/variables/search: post: - description: "\nSearch variables \n Version: 10.9.0.cl or later\n\n\nAllows\ + description: "\nSearch variables \n Version: 10.14.0.cl or later\n\n\nAllows\ \ searching for variables in ThoughtSpot.\n\nRequires ADMINISTRATION role.\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_ONLY - Returns only variable metadata (default)\n* METADATA_AND_VALUES\ - \ - Returns variable metadata and values\n* EDITABLE_METADATA_AND_VALUES -\ - \ Returns only editable 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" + 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: @@ -8001,10 +8264,11 @@ paths: - application/json /api/rest/2.0/template/variables/{identifier}/update: post: - description: "\nUpdate a variable's properties \n Version: 10.9.0.cl or later\n\ - \n\nAllows updating a variable's properties in ThoughtSpot.\n\nRequires ADMINISTRATION\ - \ role and TENANT scope.\n\nThe API endpoint allows updating:\n* The variable\ - \ name\n\n\n\n\n" + description: "\nUpdate a variable's name \n Version: 10.14.0.cl or later\n\n\ + \nAllows updating a variable's properties 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. @@ -8023,7 +8287,7 @@ paths: required: true responses: "204": - description: Updating the variable is successful. + description: Variable name updated successfully. "400": content: application/json: @@ -8054,21 +8318,22 @@ paths: x-content-type: application/json x-accepts: - application/json - /api/rest/2.0/template/variables/update: + /api/rest/2.0/template/variables/update-values: post: - description: "\nUpdate values for multiple variables \n Version: 10.9.0.cl or\ - \ later\n\n\nAllows updating values for multiple variables in ThoughtSpot.\n\ - \nRequires ADMINISTRATION role.\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, CLEAR)\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* CLEAR - Removes all constrains\ - \ for a given variable, scope is ignored\n\n\n\n\n\n" + description: "\nUpdate values for multiple variables \n Version: 10.14.0.cl\ + \ or later\n\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, CLEAR)\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* CLEAR - Removes all\ + \ constrains for a given variable, scope is ignored\n\n\n\n\n\n" operationId: updateVariableValues parameters: [] requestBody: @@ -8079,7 +8344,7 @@ paths: required: true responses: "204": - description: Updating variable values is successful. + description: Variable values updated successfully. "400": content: application/json: @@ -8706,69 +8971,498 @@ paths: 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 - 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 + /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/createWebhookConfiguration_request' + 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: '***' + created_at: 2025-08-21T21:57:10.243089030Z + last_modified_at: 2025-08-21T21:57:10.243089030Z + 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: '***' + created_at: 2025-08-21T22:15:30.123456789Z + last_modified_at: 2025-08-21T22:15:30.123456789Z + created_by: + id: 7d5e9f2a-4b8c-4d6e-9a3b-5c7e1f4a8b2d + name: mike_rodriguez + 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/deleteWebhookConfigurations_request' + 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: '***' + created_at: 2025-08-21T15:30:00.000000000Z + last_modified_at: 2025-08-21T15:30:00.000000000Z + 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: '***' + created_at: 2025-08-21T16:45:30.123456789Z + last_modified_at: 2025-08-21T16:45:30.123456789Z + 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: "" + created_at: 2025-08-21T18:20:15.456789012Z + last_modified_at: 2025-08-21T18:20:15.456789012Z + 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/searchWebhookConfigurations_request' + 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: '***' + created_at: 2025-08-21T21:57:10.243089030Z + last_modified_at: 2025-08-21T22:10:15.123456789Z + 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: '***' + created_at: 2025-08-21T20:30:45.987654321Z + last_modified_at: 2025-08-21T20:30:45.987654321Z + 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/updateWebhookConfiguration_request' + 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 + 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 @@ -8818,6 +9512,7 @@ components: user_parameters: "{}" deleted: true extended_properties: "{}" + variable_values: "{}" name: name modifier_id: modifier_id complete_detail: true @@ -9045,6 +9740,10 @@ components: 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 @@ -9289,6 +9988,140 @@ components: nullable: true type: object type: object + OrgPreferenceSearchCriteriaInput: + 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 OrgResponse: example: visibility: SHOW @@ -10522,8 +11355,8 @@ components: type: object ColumnSecurityRuleResponse: example: - columnSecurityRules: - - sourceTableDetails: + column_security_rules: + - source_table_details: name: name id: id column: @@ -10534,7 +11367,7 @@ components: id: id - name: name id: id - - sourceTableDetails: + - source_table_details: name: name id: id column: @@ -10545,19 +11378,19 @@ components: id: id - name: name id: id - objId: objId - guid: guid + obj_id: obj_id + table_guid: table_guid properties: - guid: + table_guid: description: GUID of the table for which the column security rules are fetched nullable: true type: string - objId: + obj_id: description: Object ID of the table for which the column security rules are fetched nullable: true type: string - columnSecurityRules: + column_security_rules: description: Array containing column security rule objects items: $ref: '#/components/schemas/ColumnSecurityRule' @@ -10566,7 +11399,7 @@ components: type: object ColumnSecurityRule: example: - sourceTableDetails: + source_table_details: name: name id: id column: @@ -10586,7 +11419,7 @@ components: $ref: '#/components/schemas/ColumnSecurityRuleGroup' nullable: true type: array - sourceTableDetails: + source_table_details: $ref: '#/components/schemas/ColumnSecurityRuleSourceTable' required: - column @@ -11887,6 +12720,8 @@ components: - ALLOW_NON_EMBED_FULL_APP_ACCESS - CAN_ACCESS_ANALYST_STUDIO - CAN_MANAGE_ANALYST_STUDIO + - CAN_VIEW_FOLDERS + - CAN_MODIDY_FOLDERS - PREVIEW_DOCUMENT_SEARCH - CAN_SETUP_VERSION_CONTROL - CAN_MANAGE_WEBHOOKS @@ -12496,17 +13331,40 @@ components: 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 + type: + description: Type of variable + enum: + - CONNECTION_PROPERTY + - TABLE_MAPPING + - CONNECTION_PROPERTY_PER_PRINCIPAL + 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 variable scope in search + properties: + 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 - name_pattern: - description: A pattern to match case-insensitive name of the variable. User - % for a wildcard match + model_identifier: + description: Model Identifier nullable: true type: string type: object @@ -12517,11 +13375,17 @@ components: values: - principal_identifier: principal_identifier org_identifier: org_identifier + value_list: + - value_list + - value_list principal_type: USER priority: 0 value: value - principal_identifier: principal_identifier org_identifier: org_identifier + value_list: + - value_list + - value_list principal_type: USER priority: 0 value: value @@ -12561,6 +13425,9 @@ components: example: principal_identifier: principal_identifier org_identifier: org_identifier + value_list: + - value_list + - value_list principal_type: USER priority: 0 value: value @@ -12569,6 +13436,12 @@ components: 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 @@ -12763,6 +13636,370 @@ components: 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: + - 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 + 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 + - 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 + 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: + 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 + 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' + 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' + 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 + 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 + 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 GenericInfo: example: name: name @@ -12885,8 +14122,7 @@ components: 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`. The `LIVEBOARD` and `ANSWER` object types are not\ - \ supported." + \ as `LOGICAL_TABLE`." enum: - LOGICAL_TABLE nullable: true @@ -13167,8 +14403,7 @@ components: 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`. The `LIVEBOARD` and `ANSWER` object types are not\ - \ supported." + \ as `LOGICAL_TABLE`." enum: - LOGICAL_TABLE nullable: true @@ -13402,6 +14637,60 @@ components: required: - name type: object + EventChannelConfigInput: + 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: + 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 TagMetadataTypeInput: properties: type: @@ -13473,6 +14762,8 @@ components: - ALLOW_NON_EMBED_FULL_APP_ACCESS - CAN_ACCESS_ANALYST_STUDIO - CAN_MANAGE_ANALYST_STUDIO + - CAN_MODIFY_FOLDERS + - CAN_VIEW_FOLDERS - PREVIEW_DOCUMENT_SEARCH - CAN_SETUP_VERSION_CONTROL - CAN_DOWNLOAD_VISUALS @@ -13591,6 +14882,13 @@ components: \ 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: @@ -14447,6 +15745,8 @@ components: - CAN_ACCESS_ANALYST_STUDIO - CAN_MANAGE_ANALYST_STUDIO - PREVIEW_DOCUMENT_SEARCH + - CAN_MODIFY_FOLDERS + - CAN_VIEW_FOLDERS - CAN_SETUP_VERSION_CONTROL - PREVIEW_THOUGHTSPOT_SAGE - CAN_MANAGE_WEBHOOKS @@ -15448,13 +16748,35 @@ components: nullable: true type: string required: - - success + - success + type: object + VariableUpdateAssignmentInput: + description: Input for variable value update in batch operations + 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 + - CLEAR + type: string + required: + - operation + - variable_identifier + - variable_values type: object - InputVariableValue: + VariableUpdateScopeInput: + description: Input for variable value update in batch operations properties: - value: - description: The connection property value - type: string org_identifier: description: The unique name of the org type: string @@ -15469,30 +16791,17 @@ components: 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: "The priority assigned to this value. If there are 2 matching\ - \ values, the one with the higher priority will be picked." + description: Priority level format: int32 nullable: true type: integer required: - org_identifier - - value - type: object - VariableValueInput: - description: Input for variable value update - properties: - variable_identifier: - description: ID or Name of the variable - type: string - variable_values: - description: Values of the variable - items: - $ref: '#/components/schemas/InputVariableValue' - type: array - required: - - variable_identifier - - variable_values type: object CreateEmailCustomizationResponse: example: @@ -15660,6 +16969,212 @@ components: - connection_identifier - table_name 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 + WebhookDeleteResponse: + example: + failed_webhooks: + - name: name + id: id + error: error + - name: name + id: id + error: error + deleted_webhooks: + - 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 + 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 + - 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 + 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 Runtime_Filter: description: List of runtime parameters need to set during the session. properties: @@ -15786,6 +17301,16 @@ components: type: string type: array type: object + sendAgentMessage_request: + properties: + messages: + description: messages to be sent to the agent + items: + type: string + type: array + required: + - messages + type: object sendAgentMessageStreaming_request: properties: conversation_identifier: @@ -15957,6 +17482,14 @@ components: 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 @@ -16015,6 +17548,14 @@ components: 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 @@ -16971,7 +18512,9 @@ components: description: Unique ID of the DBT connection. type: string model_tables: - description: List of Models and their respective Tables + description: |- + List of Models and their respective Tables + Example: '[{"model_name": "model_name", "tables": ["table_name"]}]' format: json type: string import_worksheets: @@ -16982,8 +18525,9 @@ components: - SELECTED type: string worksheets: - description: List of worksheets is mandatory when import_Worksheets is type - SELECTED + description: |- + List of worksheets is mandatory when import_Worksheets is type SELECTED + Example: ["worksheet_name"] format: json type: string file_content: @@ -16995,6 +18539,7 @@ components: required: - dbt_connection_identifier - import_worksheets + - model_tables type: object updateDbtConnection_request: properties: @@ -17126,6 +18671,8 @@ components: - ALLOW_NON_EMBED_FULL_APP_ACCESS - CAN_ACCESS_ANALYST_STUDIO - CAN_MANAGE_ANALYST_STUDIO + - CAN_MODIFY_FOLDERS + - CAN_VIEW_FOLDERS - PREVIEW_DOCUMENT_SEARCH - CAN_SETUP_VERSION_CONTROL - CAN_DOWNLOAD_VISUALS @@ -17256,6 +18803,8 @@ components: - CAN_ACCESS_ANALYST_STUDIO - CAN_MANAGE_ANALYST_STUDIO - PREVIEW_DOCUMENT_SEARCH + - CAN_MODIFY_FOLDERS + - CAN_VIEW_FOLDERS - CAN_SETUP_VERSION_CONTROL - CAN_MANAGE_WEBHOOKS - CAN_DOWNLOAD_VISUALS @@ -17374,6 +18923,8 @@ components: - ALLOW_NON_EMBED_FULL_APP_ACCESS - CAN_ACCESS_ANALYST_STUDIO - CAN_MANAGE_ANALYST_STUDIO + - CAN_MODIFY_FOLDERS + - CAN_VIEW_FOLDERS - PREVIEW_DOCUMENT_SEARCH - CAN_SETUP_VERSION_CONTROL - CAN_DOWNLOAD_VISUALS @@ -18264,6 +19815,8 @@ components: - CAN_ACCESS_ANALYST_STUDIO - CAN_MANAGE_ANALYST_STUDIO - PREVIEW_DOCUMENT_SEARCH + - CAN_MODIFY_FOLDERS + - CAN_VIEW_FOLDERS - CAN_SETUP_VERSION_CONTROL - PREVIEW_THOUGHTSPOT_SAGE - CAN_MANAGE_WEBHOOKS @@ -18348,6 +19901,8 @@ components: - ALLOW_NON_EMBED_FULL_APP_ACCESS - CAN_ACCESS_ANALYST_STUDIO - CAN_MANAGE_ANALYST_STUDIO + - CAN_VIEW_FOLDERS + - CAN_MODIDY_FOLDERS - PREVIEW_DOCUMENT_SEARCH - CAN_SETUP_VERSION_CONTROL - CAN_MANAGE_WEBHOOKS @@ -18423,6 +19978,8 @@ components: - CAN_CREATE_CATALOG - CAN_ACCESS_ANALYST_STUDIO - CAN_MANAGE_ANALYST_STUDIO + - CAN_MODIFY_FOLDERS + - CAN_VIEW_FOLDERS - PREVIEW_DOCUMENT_SEARCH - PREVIEW_THOUGHTSPOT_SAGE - CAN_MANAGE_WEBHOOKS @@ -20092,6 +21649,34 @@ components: required: - column_security_rules type: object + configureCommunicationChannelPreferences_request: + 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 + searchCommunicationChannelPreferences_request: + 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 updateSystemConfig_request: properties: configuration: @@ -20445,6 +22030,8 @@ components: - CAN_ACCESS_ANALYST_STUDIO - CAN_MANAGE_ANALYST_STUDIO - PREVIEW_DOCUMENT_SEARCH + - CAN_MODIFY_FOLDERS + - CAN_VIEW_FOLDERS - CAN_SETUP_VERSION_CONTROL - CAN_MANAGE_WEBHOOKS - CAN_DOWNLOAD_VISUALS @@ -20655,16 +22242,21 @@ components: name: description: Name of the variable. This is unique across the cluster. type: string - sensitive: + is_sensitive: default: false description: If the variable contains sensitive values like passwords nullable: true type: boolean - values: - description: Values of variable - items: - $ref: '#/components/schemas/InputVariableValue' - type: array + data_type: + description: Variable Data Type + enum: + - VARCHAR + - INT32 + - INT64 + - DOUBLE + - DATE + - DATE_TIME + type: string required: - name - type @@ -20676,6 +22268,11 @@ components: 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 @@ -20693,45 +22290,31 @@ components: enum: - METADATA_ONLY - METADATA_AND_VALUES - - EDITABLE_METADATA_AND_VALUES type: string type: object updateVariable_request: properties: name: - description: New name of the variable if we want to rename. - type: string - operation: - default: REPLACE - description: Operation to perform on the values. - enum: - - ADD - - REMOVE - - REPLACE + description: New name of the variable. type: string - values: - description: Values of variable to be updated. - items: - $ref: '#/components/schemas/InputVariableValue' - type: array + required: + - name type: object updateVariableValues_request: properties: - variable_updates: - description: Variables and values + variable_assignment: + description: Variables and values to update items: - $ref: '#/components/schemas/VariableValueInput' + $ref: '#/components/schemas/VariableUpdateAssignmentInput' + type: array + variable_value_scope: + description: Variables and values to update + items: + $ref: '#/components/schemas/VariableUpdateScopeInput' type: array - operation: - description: Type of update operation - enum: - - ADD - - REMOVE - - REPLACE - type: string required: - - operation - - variable_updates + - variable_assignment + - variable_value_scope type: object commitBranch_request: properties: @@ -20965,6 +22548,110 @@ components: - source_branch_name - target_branch_name type: object + createWebhookConfiguration_request: + 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. + required: + - events + - name + - url + type: object + deleteWebhookConfigurations_request: + properties: + webhook_identifiers: + description: List of webhook identifiers to delete. + items: + type: string + type: array + required: + - webhook_identifiers + type: object + searchWebhookConfigurations_request: + 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 + updateWebhookConfiguration_request: + 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. + type: object securitySchemes: bearerAuth: scheme: bearer @@ -21055,6 +22742,11 @@ x-roles: tags: - 9.5.0.cl description: Roles for version 9.5.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: diff --git a/sdks/java/build.gradle b/sdks/java/build.gradle index 271c93c0a..c560e39c8 100644 --- a/sdks/java/build.gradle +++ b/sdks/java/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'com.thoughtspot' -version = '2.18.0' +version = '2.19.0' buildscript { repositories { diff --git a/sdks/java/build.sbt b/sdks/java/build.sbt index 045af7603..76f597434 100644 --- a/sdks/java/build.sbt +++ b/sdks/java/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "com.thoughtspot", name := "rest-api-sdk", - version := "2.18.0", + version := "2.19.0", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), javacOptions in compile ++= Seq("-Xlint:deprecation"), diff --git a/sdks/java/docs/AiApi.md b/sdks/java/docs/AiApi.md index 8378d2b11..4318afae1 100644 --- a/sdks/java/docs/AiApi.md +++ b/sdks/java/docs/AiApi.md @@ -9,6 +9,7 @@ All URIs are relative to *CLUSTER_URL* | [**getDataSourceSuggestions**](AiApi.md#getDataSourceSuggestions) | **POST** /api/rest/2.0/ai/data-source-suggestions | | [**getRelevantQuestions**](AiApi.md#getRelevantQuestions) | **POST** /api/rest/2.0/ai/relevant-questions/ | | [**queryGetDecomposedQuery**](AiApi.md#queryGetDecomposedQuery) | **POST** /api/rest/2.0/ai/analytical-questions | +| [**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 | | [**singleAnswer**](AiApi.md#singleAnswer) | **POST** /api/rest/2.0/ai/answer/create | @@ -189,6 +190,42 @@ Version: 10.7.0.cl or later | **400** | Operation failed | - | | **500** | Operation failed | - | + +# **sendAgentMessage** +> Object sendAgentMessage(conversationIdentifier, sendAgentMessageRequest) + + + + Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### 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** +| **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 | - | +| **500** | Operation failed | - | + # **sendAgentMessageStreaming** > SendAgentMessageResponse sendAgentMessageStreaming(sendAgentMessageStreamingRequest) diff --git a/sdks/java/docs/AuthenticationApi.md b/sdks/java/docs/AuthenticationApi.md index fa8917558..55f4e0efa 100644 --- a/sdks/java/docs/AuthenticationApi.md +++ b/sdks/java/docs/AuthenticationApi.md @@ -87,7 +87,7 @@ This endpoint does not need any parameter. - Version: 10.4.0.cl or later Gets an authentication token with custom rules and security attributes and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. To add a new user and assign privileges during auto creation, you need `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. 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 is required. To assign security attributes with filter rules and Parameters to the JWT token, you'll need administrator privileges and edit access to the data source (Worksheet or Model). 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 is required. #### Usage guidelines You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key`. To generate a `secret_key` on your cluster, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable) 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) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. ##### Attribute-Based Access Control (ABAC) with tokens To implement Attribute-Based Access Control (ABAC) and assign security entitlements to users during session creation, you can generate a token with custom filtering rules and Parameters in the `filter_rules` and `parameter_values` array respectively. These attributes can be configured to persist on a specific set of objects for user sessions initiated using the token. Once defined, the rules are added to the user's `access_control_properties` object, after which all sessions will use the persisted values. Specify the object type as `LOGICAL_TABLE`. The `LIVEBOARD` and `ANSWER` object types are not supported. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/api-authv2#_get_tokens_with_custom_rules_and_filter_conditions). ##### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `groups` 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` in the API request, the user properties such as the display name, email, Org and group assignment will not be updated with new values. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). ##### Important point to note All options in the token creation APIs that define access to the content in ThoughtSpot will do so during the token creation and not when the token is being used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND`, `REPLACE`, `RESET` will persist security parameters on the user profile when the token is created, while Persist option `NONE` will not persist anything but will be honoured in the session. + Version: 10.4.0.cl or later Gets an authentication token with custom rules and security attributes and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. To add a new user and assign privileges during auto creation, you need `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. 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 is required. To assign security attributes with filter rules and Parameters to the JWT token, you'll need administrator privileges and edit access to the data source (Worksheet or Model). 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 is required. #### Usage guidelines You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key`. To generate a `secret_key` on your cluster, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable) 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) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. ##### Attribute-Based Access Control (ABAC) with tokens To implement Attribute-Based Access Control (ABAC) and assign security entitlements to users during session creation, you can generate a token with custom filtering rules and Parameters in the `filter_rules` and `parameter_values` array respectively. These attributes can be configured to persist on a specific set of objects for user sessions initiated using the token. Once defined, the rules are added to the user's `access_control_properties` object, after which all sessions will use the persisted values. Specify the object type as `LOGICAL_TABLE`. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/api-authv2#_get_tokens_with_custom_rules_and_filter_conditions). ##### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `groups` 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` in the API request, the user properties such as the display name, email, Org and group assignment will not be updated with new values. If `auto_create` is set to `true`, it won't create formula variables and hence won't be applicable for `variable_values`. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). ##### Important point to note All options in the token creation APIs that define access to the content in ThoughtSpot will do so during the token creation and not when the token is being used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND`, `REPLACE`, `RESET` will persist security parameters on the user profile when the token is created, while Persist option `NONE` will not persist anything but will be honoured in the session. ##### Formula Variables Before using variables_values, variables must be created using Create Variable API with type as Formula_Variable (/api/rest/2.0/template/variables/create) The persist_option RESET and NONE cannot be used when variable_values are provided in the request. If you are working with variable_values, you must use other (APPEND, REPLACE) supported modes. If you want to use RESET or NONE, do not pass any variable_values. In such cases, variable_values will remain unaffected. When using object_id with variable_values, models are supported. ### Parameters diff --git a/sdks/java/docs/ColumnSecurityRuleResponse.md b/sdks/java/docs/ColumnSecurityRuleResponse.md index 952026c17..6e79864f0 100644 --- a/sdks/java/docs/ColumnSecurityRuleResponse.md +++ b/sdks/java/docs/ColumnSecurityRuleResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**guid** | **String** | GUID of the table for which the column security rules are fetched | [optional] | +|**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] | 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/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/ConnectionsApi.md b/sdks/java/docs/ConnectionsApi.md index e99d0ba17..b3c8073cd 100644 --- a/sdks/java/docs/ConnectionsApi.md +++ b/sdks/java/docs/ConnectionsApi.md @@ -272,7 +272,7 @@ null (empty response body) - 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: ``` { \"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\" } ] } ] } ] } ] } ``` 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\":[ ] } ``` + 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 diff --git a/sdks/java/docs/CreateRoleRequest.md b/sdks/java/docs/CreateRoleRequest.md index 838ea5003..4ba139579 100644 --- a/sdks/java/docs/CreateRoleRequest.md +++ b/sdks/java/docs/CreateRoleRequest.md @@ -49,6 +49,8 @@ | 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_VIEW_FOLDERS | "CAN_VIEW_FOLDERS" | | CAN_SETUP_VERSION_CONTROL | "CAN_SETUP_VERSION_CONTROL" | | PREVIEW_THOUGHTSPOT_SAGE | "PREVIEW_THOUGHTSPOT_SAGE" | | CAN_MANAGE_WEBHOOKS | "CAN_MANAGE_WEBHOOKS" | diff --git a/sdks/java/docs/CreateUserGroupRequest.md b/sdks/java/docs/CreateUserGroupRequest.md index 1387ebb05..a5713bcdd 100644 --- a/sdks/java/docs/CreateUserGroupRequest.md +++ b/sdks/java/docs/CreateUserGroupRequest.md @@ -49,6 +49,8 @@ | 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_VIEW_FOLDERS | "CAN_VIEW_FOLDERS" | | PREVIEW_DOCUMENT_SEARCH | "PREVIEW_DOCUMENT_SEARCH" | | CAN_SETUP_VERSION_CONTROL | "CAN_SETUP_VERSION_CONTROL" | | CAN_DOWNLOAD_VISUALS | "CAN_DOWNLOAD_VISUALS" | diff --git a/sdks/java/docs/CreateVariableRequest.md b/sdks/java/docs/CreateVariableRequest.md index 16eea25f2..603d6221c 100644 --- a/sdks/java/docs/CreateVariableRequest.md +++ b/sdks/java/docs/CreateVariableRequest.md @@ -9,8 +9,8 @@ |------------ | ------------- | ------------- | -------------| |**type** | [**TypeEnum**](#TypeEnum) | Type of variable | | |**name** | **String** | Name of the variable. This is unique across the cluster. | | -|**sensitive** | **Boolean** | If the variable contains sensitive values like passwords | [optional] | -|**values** | [**List<InputVariableValue>**](InputVariableValue.md) | Values of variable | [optional] | +|**isSensitive** | **Boolean** | If the variable contains sensitive values like passwords | [optional] | +|**dataType** | [**DataTypeEnum**](#DataTypeEnum) | Variable Data Type | [optional] | @@ -23,6 +23,19 @@ | CONNECTION_PROPERTY_PER_PRINCIPAL | "CONNECTION_PROPERTY_PER_PRINCIPAL" | + +## 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..e93af0d6b --- /dev/null +++ b/sdks/java/docs/CreateWebhookConfigurationRequest.md @@ -0,0 +1,31 @@ + + +# 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] | + + + +## Enum: List<EventsEnum> + +| Name | Value | +|---- | -----| +| LIVEBOARD_SCHEDULE | "LIVEBOARD_SCHEDULE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DbtApi.md b/sdks/java/docs/DbtApi.md index 8fb65d640..56aca016e 100644 --- a/sdks/java/docs/DbtApi.md +++ b/sdks/java/docs/DbtApi.md @@ -96,7 +96,7 @@ All URIs are relative to *CLUSTER_URL* # **dbtGenerateTml** -> Object dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent) +> Object dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent) @@ -107,8 +107,8 @@ All URIs are relative to *CLUSTER_URL* | Name | Type | |------------- | ------------- | | **dbtConnectionIdentifier** | **String** -| **importWorksheets** | **String** | **modelTables** | **String** +| **importWorksheets** | **String** | **worksheets** | **String** | **fileContent** | **File** 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/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/ExportOptions.md b/sdks/java/docs/ExportOptions.md index 7d1f8c758..c961d8bb1 100644 --- a/sdks/java/docs/ExportOptions.md +++ b/sdks/java/docs/ExportOptions.md @@ -13,6 +13,7 @@ Flags to specify additional options for export. This will only be active when Us |**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 diff --git a/sdks/java/docs/GetFullAccessTokenRequest.md b/sdks/java/docs/GetFullAccessTokenRequest.md index 918bdd488..e21d60cdb 100644 --- a/sdks/java/docs/GetFullAccessTokenRequest.md +++ b/sdks/java/docs/GetFullAccessTokenRequest.md @@ -16,6 +16,7 @@ |**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 diff --git a/sdks/java/docs/GetObjectAccessTokenRequest.md b/sdks/java/docs/GetObjectAccessTokenRequest.md index c508a909a..1ad301910 100644 --- a/sdks/java/docs/GetObjectAccessTokenRequest.md +++ b/sdks/java/docs/GetObjectAccessTokenRequest.md @@ -17,6 +17,7 @@ |**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 diff --git a/sdks/java/docs/GroupsImportListInput.md b/sdks/java/docs/GroupsImportListInput.md index 89099f416..45de8ff7f 100644 --- a/sdks/java/docs/GroupsImportListInput.md +++ b/sdks/java/docs/GroupsImportListInput.md @@ -48,6 +48,8 @@ | 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_VIEW_FOLDERS | "CAN_VIEW_FOLDERS" | | PREVIEW_DOCUMENT_SEARCH | "PREVIEW_DOCUMENT_SEARCH" | | CAN_SETUP_VERSION_CONTROL | "CAN_SETUP_VERSION_CONTROL" | | CAN_DOWNLOAD_VISUALS | "CAN_DOWNLOAD_VISUALS" | diff --git a/sdks/java/docs/MetadataApi.md b/sdks/java/docs/MetadataApi.md index 0e5fa5dc4..5fc30396c 100644 --- a/sdks/java/docs/MetadataApi.md +++ b/sdks/java/docs/MetadataApi.md @@ -63,7 +63,7 @@ All URIs are relative to *CLUSTER_URL* - Makes a copy of an Answer or Liveboard saved in Atlas 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. + 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 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/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/RoleResponse.md b/sdks/java/docs/RoleResponse.md index 58859a346..ceb2383df 100644 --- a/sdks/java/docs/RoleResponse.md +++ b/sdks/java/docs/RoleResponse.md @@ -62,6 +62,8 @@ | 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_VIEW_FOLDERS | "CAN_VIEW_FOLDERS" | | CAN_SETUP_VERSION_CONTROL | "CAN_SETUP_VERSION_CONTROL" | | PREVIEW_THOUGHTSPOT_SAGE | "PREVIEW_THOUGHTSPOT_SAGE" | | CAN_MANAGE_WEBHOOKS | "CAN_MANAGE_WEBHOOKS" | 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/SearchRoleResponse.md b/sdks/java/docs/SearchRoleResponse.md index a5bcdd1a0..822764d6d 100644 --- a/sdks/java/docs/SearchRoleResponse.md +++ b/sdks/java/docs/SearchRoleResponse.md @@ -75,6 +75,8 @@ Response for search role api should handle hidden privileges as well. | 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" | | PREVIEW_DOCUMENT_SEARCH | "PREVIEW_DOCUMENT_SEARCH" | | CAN_SETUP_VERSION_CONTROL | "CAN_SETUP_VERSION_CONTROL" | | CAN_MANAGE_WEBHOOKS | "CAN_MANAGE_WEBHOOKS" | diff --git a/sdks/java/docs/SearchRolesRequest.md b/sdks/java/docs/SearchRolesRequest.md index 0d14ce452..59ba8914a 100644 --- a/sdks/java/docs/SearchRolesRequest.md +++ b/sdks/java/docs/SearchRolesRequest.md @@ -65,6 +65,8 @@ | 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" | | PREVIEW_DOCUMENT_SEARCH | "PREVIEW_DOCUMENT_SEARCH" | | CAN_SETUP_VERSION_CONTROL | "CAN_SETUP_VERSION_CONTROL" | | CAN_MANAGE_WEBHOOKS | "CAN_MANAGE_WEBHOOKS" | diff --git a/sdks/java/docs/SearchUserGroupsRequest.md b/sdks/java/docs/SearchUserGroupsRequest.md index 2c8c597f5..cb358b2eb 100644 --- a/sdks/java/docs/SearchUserGroupsRequest.md +++ b/sdks/java/docs/SearchUserGroupsRequest.md @@ -66,6 +66,8 @@ | 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_VIEW_FOLDERS | "CAN_VIEW_FOLDERS" | | CAN_SETUP_VERSION_CONTROL | "CAN_SETUP_VERSION_CONTROL" | | CAN_MANAGE_WEBHOOKS | "CAN_MANAGE_WEBHOOKS" | | CAN_DOWNLOAD_VISUALS | "CAN_DOWNLOAD_VISUALS" | diff --git a/sdks/java/docs/SearchUsersRequest.md b/sdks/java/docs/SearchUsersRequest.md index 0951d165f..9be79d6ca 100644 --- a/sdks/java/docs/SearchUsersRequest.md +++ b/sdks/java/docs/SearchUsersRequest.md @@ -78,6 +78,8 @@ | 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_VIEW_FOLDERS | "CAN_VIEW_FOLDERS" | | CAN_SETUP_VERSION_CONTROL | "CAN_SETUP_VERSION_CONTROL" | | CAN_MANAGE_WEBHOOKS | "CAN_MANAGE_WEBHOOKS" | | CAN_DOWNLOAD_VISUALS | "CAN_DOWNLOAD_VISUALS" | diff --git a/sdks/java/docs/SearchVariablesRequest.md b/sdks/java/docs/SearchVariablesRequest.md index a94dc973b..f5cf7a9fe 100644 --- a/sdks/java/docs/SearchVariablesRequest.md +++ b/sdks/java/docs/SearchVariablesRequest.md @@ -8,6 +8,7 @@ | 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] | |**outputFormat** | [**OutputFormatEnum**](#OutputFormatEnum) | Format in which we want the output | [optional] | @@ -20,7 +21,6 @@ |---- | -----| | METADATA_ONLY | "METADATA_ONLY" | | METADATA_AND_VALUES | "METADATA_AND_VALUES" | -| EDITABLE_METADATA_AND_VALUES | "EDITABLE_METADATA_AND_VALUES" | ## Implemented Interfaces 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/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/SystemApi.md b/sdks/java/docs/SystemApi.md index 8fa061067..1d9ba0cbe 100644 --- a/sdks/java/docs/SystemApi.md +++ b/sdks/java/docs/SystemApi.md @@ -4,12 +4,50 @@ All URIs are relative to *CLUSTER_URL* | Method | HTTP request | |------------- | ------------- | +| [**configureCommunicationChannelPreferences**](SystemApi.md#configureCommunicationChannelPreferences) | **POST** /api/rest/2.0/system/preferences/communication-channels/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 | | [**updateSystemConfig**](SystemApi.md#updateSystemConfig) | **POST** /api/rest/2.0/system/config-update | + +# **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 | - | + # **getSystemConfig** > SystemConfig getSystemConfig() @@ -109,6 +147,42 @@ This endpoint does not need any parameter. | **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 | - | + # **updateSystemConfig** > updateSystemConfig(updateSystemConfigRequest) diff --git a/sdks/java/docs/ThoughtSpotRestApi.md b/sdks/java/docs/ThoughtSpotRestApi.md index 44d62a1e6..17b6699af 100644 --- a/sdks/java/docs/ThoughtSpotRestApi.md +++ b/sdks/java/docs/ThoughtSpotRestApi.md @@ -9,6 +9,7 @@ All URIs are relative to *CLUSTER_URL* | [**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 | +| [**configureCommunicationChannelPreferences**](ThoughtSpotRestApi.md#configureCommunicationChannelPreferences) | **POST** /api/rest/2.0/system/preferences/communication-channels/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 | @@ -27,6 +28,7 @@ All URIs are relative to *CLUSTER_URL* | [**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 | @@ -49,6 +51,7 @@ All URIs are relative to *CLUSTER_URL* | [**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 | +| [**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 | @@ -91,6 +94,7 @@ All URIs are relative to *CLUSTER_URL* | [**revokeToken**](ThoughtSpotRestApi.md#revokeToken) | **POST** /api/rest/2.0/auth/token/revoke | | [**searchCalendars**](ThoughtSpotRestApi.md#searchCalendars) | **POST** /api/rest/2.0/calendars/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 | @@ -104,6 +108,8 @@ All URIs are relative to *CLUSTER_URL* | [**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 | +| [**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 | | [**shareMetadata**](ThoughtSpotRestApi.md#shareMetadata) | **POST** /api/rest/2.0/security/metadata/share | @@ -130,7 +136,8 @@ All URIs are relative to *CLUSTER_URL* | [**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 | +| [**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 | | [**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 | @@ -316,6 +323,42 @@ null (empty response body) | **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 | - | + # **connectionConfigurationSearch** > List<ConnectionConfigurationResponse> connectionConfigurationSearch(connectionConfigurationSearchRequest) @@ -394,7 +437,7 @@ null (empty response body) - Makes a copy of an Answer or Liveboard saved in Atlas 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. + 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 @@ -932,7 +975,7 @@ Version: 10.13.0.cl or later - Create a variable which can be used for parameterizing metadata objects Version: 10.9.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 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 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 fomula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + Create a variable which can be used for parameterizing metadata objects Version: 10.14.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 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 fomula 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 @@ -962,6 +1005,42 @@ Version: 10.13.0.cl or later | **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) @@ -1046,7 +1125,7 @@ Version: 10.13.0.cl or later # **dbtGenerateTml** -> Object dbtGenerateTml(dbtConnectionIdentifier, importWorksheets, modelTables, worksheets, fileContent) +> Object dbtGenerateTml(dbtConnectionIdentifier, modelTables, importWorksheets, worksheets, fileContent) @@ -1057,8 +1136,8 @@ Version: 10.13.0.cl or later | Name | Type | |------------- | ------------- | | **dbtConnectionIdentifier** | **String** -| **importWorksheets** | **String** | **modelTables** | **String** +| **importWorksheets** | **String** | **worksheets** | **String** | **fileContent** | **File** @@ -1734,7 +1813,7 @@ null (empty response body) - Delete a variable Version: 10.9.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT 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 + Delete a variable Version: 10.14.0.cl or later 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 @@ -1764,6 +1843,42 @@ null (empty response body) | **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) @@ -2484,7 +2599,7 @@ This endpoint does not need any parameter. - Version: 10.4.0.cl or later Gets an authentication token with custom rules and security attributes and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. To add a new user and assign privileges during auto creation, you need `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. 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 is required. To assign security attributes with filter rules and Parameters to the JWT token, you'll need administrator privileges and edit access to the data source (Worksheet or Model). 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 is required. #### Usage guidelines You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key`. To generate a `secret_key` on your cluster, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable) 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) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. ##### Attribute-Based Access Control (ABAC) with tokens To implement Attribute-Based Access Control (ABAC) and assign security entitlements to users during session creation, you can generate a token with custom filtering rules and Parameters in the `filter_rules` and `parameter_values` array respectively. These attributes can be configured to persist on a specific set of objects for user sessions initiated using the token. Once defined, the rules are added to the user's `access_control_properties` object, after which all sessions will use the persisted values. Specify the object type as `LOGICAL_TABLE`. The `LIVEBOARD` and `ANSWER` object types are not supported. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/api-authv2#_get_tokens_with_custom_rules_and_filter_conditions). ##### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `groups` 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` in the API request, the user properties such as the display name, email, Org and group assignment will not be updated with new values. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). ##### Important point to note All options in the token creation APIs that define access to the content in ThoughtSpot will do so during the token creation and not when the token is being used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND`, `REPLACE`, `RESET` will persist security parameters on the user profile when the token is created, while Persist option `NONE` will not persist anything but will be honoured in the session. + Version: 10.4.0.cl or later Gets an authentication token with custom rules and security attributes and creates a full session in ThoughtSpot for a given user. By default, the token obtained from ThoughtSpot remains valid for 5 mins. To add a new user and assign privileges during auto creation, you need `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. 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 is required. To assign security attributes with filter rules and Parameters to the JWT token, you'll need administrator privileges and edit access to the data source (Worksheet or Model). 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 is required. #### Usage guidelines You can generate the token for a user by providing a `username` and `password`, or by using the cluster’s `secret_key`. To generate a `secret_key` on your cluster, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/?pageid=trusted-auth#trusted-auth-enable) 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) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance. ##### Attribute-Based Access Control (ABAC) with tokens To implement Attribute-Based Access Control (ABAC) and assign security entitlements to users during session creation, you can generate a token with custom filtering rules and Parameters in the `filter_rules` and `parameter_values` array respectively. These attributes can be configured to persist on a specific set of objects for user sessions initiated using the token. Once defined, the rules are added to the user's `access_control_properties` object, after which all sessions will use the persisted values. Specify the object type as `LOGICAL_TABLE`. For more information, see [ABAC via tokens Documentation](https://developers.thoughtspot.com/docs/api-authv2#_get_tokens_with_custom_rules_and_filter_conditions). ##### Just-in-time provisioning For just-in-time user creation and provisioning, define the following attributes: * `auto_create` * `username` * `display_name` * `email` * `groups` 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` in the API request, the user properties such as the display name, email, Org and group assignment will not be updated with new values. If `auto_create` is set to `true`, it won't create formula variables and hence won't be applicable for `variable_values`. For more information, see [Just-in-time provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). ##### Important point to note All options in the token creation APIs that define access to the content in ThoughtSpot will do so during the token creation and not when the token is being used for authentication. For example, `auto_create:true` will create the user when the authentication token is created. Persist options such as `APPEND`, `REPLACE`, `RESET` will persist security parameters on the user profile when the token is created, while Persist option `NONE` will not persist anything but will be honoured in the session. ##### Formula Variables Before using variables_values, variables must be created using Create Variable API with type as Formula_Variable (/api/rest/2.0/template/variables/create) The persist_option RESET and NONE cannot be used when variable_values are provided in the request. If you are working with variable_values, you must use other (APPEND, REPLACE) supported modes. If you want to use RESET or NONE, do not pass any variable_values. In such cases, variable_values will remain unaffected. When using object_id with variable_values, models are supported. ### Parameters @@ -3256,6 +3371,42 @@ null (empty response body) | **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) @@ -3693,7 +3844,7 @@ null (empty response body) - Search variables Version: 10.9.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. 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_ONLY - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values * EDITABLE_METADATA_AND_VALUES - Returns only editable variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + Search variables Version: 10.14.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 @@ -3723,6 +3874,78 @@ null (empty response body) | **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 | - | + + +# **sendAgentMessage** +> Object sendAgentMessage(conversationIdentifier, sendAgentMessageRequest) + + + + Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### 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** +| **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 | - | +| **500** | Operation failed | - | + # **sendAgentMessageStreaming** > SendAgentMessageResponse sendAgentMessageStreaming(sendAgentMessageStreamingRequest) @@ -4161,7 +4384,7 @@ null (empty response body) - 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: ``` { \"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\" } ] } ] } ] } ] } ``` 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\":[ ] } ``` + 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 @@ -4647,7 +4870,7 @@ null (empty response body) - Update a variable's properties Version: 10.9.0.cl or later Allows updating a variable's properties in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows updating: * The variable name + Update a variable's name Version: 10.14.0.cl or later Allows updating a variable's properties 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 @@ -4672,7 +4895,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | Updating the variable is successful. | - | +| **204** | Variable name updated successfully. | - | | **400** | Invalid request. | - | | **401** | Unauthorized access. | - | | **403** | Forbidden access. | - | @@ -4684,7 +4907,7 @@ null (empty response body) - Update values for multiple variables Version: 10.9.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. 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, CLEAR) 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. * CLEAR - Removes all constrains for a given variable, scope is ignored + Update values for multiple variables Version: 10.14.0.cl or later 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, CLEAR) 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. * CLEAR - Removes all constrains for a given variable, scope is ignored ### Parameters @@ -4708,7 +4931,44 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | Updating variable values is successful. | - | +| **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. | - | diff --git a/sdks/java/docs/TokenAccessScopeObject.md b/sdks/java/docs/TokenAccessScopeObject.md index f5172f3be..0e232d0bb 100644 --- a/sdks/java/docs/TokenAccessScopeObject.md +++ b/sdks/java/docs/TokenAccessScopeObject.md @@ -8,7 +8,7 @@ Objects on which the filter rules and parameters values should be applied to | 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`. The `LIVEBOARD` and `ANSWER` object types are not supported. | [optional] | +|**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. | | diff --git a/sdks/java/docs/UpdateRoleRequest.md b/sdks/java/docs/UpdateRoleRequest.md index 9cae67411..9cab971c9 100644 --- a/sdks/java/docs/UpdateRoleRequest.md +++ b/sdks/java/docs/UpdateRoleRequest.md @@ -46,6 +46,8 @@ | 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_VIEW_FOLDERS | "CAN_VIEW_FOLDERS" | | PREVIEW_DOCUMENT_SEARCH | "PREVIEW_DOCUMENT_SEARCH" | | PREVIEW_THOUGHTSPOT_SAGE | "PREVIEW_THOUGHTSPOT_SAGE" | | CAN_MANAGE_WEBHOOKS | "CAN_MANAGE_WEBHOOKS" | diff --git a/sdks/java/docs/UpdateUserGroupRequest.md b/sdks/java/docs/UpdateUserGroupRequest.md index 1b5c4d4d0..4cfd1348d 100644 --- a/sdks/java/docs/UpdateUserGroupRequest.md +++ b/sdks/java/docs/UpdateUserGroupRequest.md @@ -50,6 +50,8 @@ | 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_VIEW_FOLDERS | "CAN_VIEW_FOLDERS" | | PREVIEW_DOCUMENT_SEARCH | "PREVIEW_DOCUMENT_SEARCH" | | CAN_SETUP_VERSION_CONTROL | "CAN_SETUP_VERSION_CONTROL" | | CAN_DOWNLOAD_VISUALS | "CAN_DOWNLOAD_VISUALS" | diff --git a/sdks/java/docs/UpdateVariableRequest.md b/sdks/java/docs/UpdateVariableRequest.md index 3c7187c0c..47ca6fb7d 100644 --- a/sdks/java/docs/UpdateVariableRequest.md +++ b/sdks/java/docs/UpdateVariableRequest.md @@ -7,19 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**name** | **String** | New name of the variable if we want to rename. | [optional] | -|**operation** | [**OperationEnum**](#OperationEnum) | Operation to perform on the values. | [optional] | -|**values** | [**List<InputVariableValue>**](InputVariableValue.md) | Values of variable to be updated. | [optional] | - - - -## Enum: OperationEnum - -| Name | Value | -|---- | -----| -| ADD | "ADD" | -| REMOVE | "REMOVE" | -| REPLACE | "REPLACE" | +|**name** | **String** | New name of the variable. | | ## Implemented Interfaces diff --git a/sdks/java/docs/UpdateVariableValuesRequest.md b/sdks/java/docs/UpdateVariableValuesRequest.md index fe4de057d..4177b4b49 100644 --- a/sdks/java/docs/UpdateVariableValuesRequest.md +++ b/sdks/java/docs/UpdateVariableValuesRequest.md @@ -7,18 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**variableUpdates** | [**List<VariableValueInput>**](VariableValueInput.md) | Variables and values | | -|**operation** | [**OperationEnum**](#OperationEnum) | Type of update operation | | - - - -## Enum: OperationEnum - -| Name | Value | -|---- | -----| -| ADD | "ADD" | -| REMOVE | "REMOVE" | -| REPLACE | "REPLACE" | +|**variableAssignment** | [**List<VariableUpdateAssignmentInput>**](VariableUpdateAssignmentInput.md) | Variables and values to update | | +|**variableValueScope** | [**List<VariableUpdateScopeInput>**](VariableUpdateScopeInput.md) | Variables and values to update | | ## Implemented Interfaces diff --git a/sdks/java/docs/UpdateWebhookConfigurationRequest.md b/sdks/java/docs/UpdateWebhookConfigurationRequest.md new file mode 100644 index 000000000..da8645826 --- /dev/null +++ b/sdks/java/docs/UpdateWebhookConfigurationRequest.md @@ -0,0 +1,31 @@ + + +# 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] | + + + +## 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 index 9fb8aeb73..51a8bbc3a 100644 --- a/sdks/java/docs/User.md +++ b/sdks/java/docs/User.md @@ -52,6 +52,7 @@ |**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] | diff --git a/sdks/java/docs/UserObject.md b/sdks/java/docs/UserObject.md index 936de81d8..4ee8b7fe0 100644 --- a/sdks/java/docs/UserObject.md +++ b/sdks/java/docs/UserObject.md @@ -8,7 +8,7 @@ Objects to apply the User_Object. | 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`. The `LIVEBOARD` and `ANSWER` object types are not supported. | [optional] | +|**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. | | diff --git a/sdks/java/docs/ValueScopeInput.md b/sdks/java/docs/ValueScopeInput.md new file mode 100644 index 000000000..b3ad4c7ce --- /dev/null +++ b/sdks/java/docs/ValueScopeInput.md @@ -0,0 +1,30 @@ + + +# ValueScopeInput + +Input for variable scope in search + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**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** | Model Identifier | [optional] | + + + +## Enum: PrincipalTypeEnum + +| Name | Value | +|---- | -----| +| USER | "USER" | +| USER_GROUP | "USER_GROUP" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/VariableApi.md b/sdks/java/docs/VariableApi.md index 922ce657d..e0be89f10 100644 --- a/sdks/java/docs/VariableApi.md +++ b/sdks/java/docs/VariableApi.md @@ -8,7 +8,7 @@ All URIs are relative to *CLUSTER_URL* | [**deleteVariable**](VariableApi.md#deleteVariable) | **POST** /api/rest/2.0/template/variables/{identifier}/delete | | [**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 | +| [**updateVariableValues**](VariableApi.md#updateVariableValues) | **POST** /api/rest/2.0/template/variables/update-values | @@ -17,7 +17,7 @@ All URIs are relative to *CLUSTER_URL* - Create a variable which can be used for parameterizing metadata objects Version: 10.9.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 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 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 fomula variables (defaults to null) The operation will fail if: * The user lacks required permissions * The variable name already exists * The variable type is invalid + Create a variable which can be used for parameterizing metadata objects Version: 10.14.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 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 fomula 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 @@ -53,7 +53,7 @@ All URIs are relative to *CLUSTER_URL* - Delete a variable Version: 10.9.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT 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 + Delete a variable Version: 10.14.0.cl or later 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 @@ -89,7 +89,7 @@ null (empty response body) - Search variables Version: 10.9.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. 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_ONLY - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values * EDITABLE_METADATA_AND_VALUES - Returns only editable variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier + Search variables Version: 10.14.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 @@ -125,7 +125,7 @@ null (empty response body) - Update a variable's properties Version: 10.9.0.cl or later Allows updating a variable's properties in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows updating: * The variable name + Update a variable's name Version: 10.14.0.cl or later Allows updating a variable's properties 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 @@ -150,7 +150,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | Updating the variable is successful. | - | +| **204** | Variable name updated successfully. | - | | **400** | Invalid request. | - | | **401** | Unauthorized access. | - | | **403** | Forbidden access. | - | @@ -162,7 +162,7 @@ null (empty response body) - Update values for multiple variables Version: 10.9.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. 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, CLEAR) 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. * CLEAR - Removes all constrains for a given variable, scope is ignored + Update values for multiple variables Version: 10.14.0.cl or later 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, CLEAR) 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. * CLEAR - Removes all constrains for a given variable, scope is ignored ### Parameters @@ -186,7 +186,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | Updating variable values is successful. | - | +| **204** | Variable values updated successfully. | - | | **400** | Invalid request. | - | | **401** | Unauthorized access. | - | | **403** | Forbidden access. | - | diff --git a/sdks/java/docs/VariableUpdateAssignmentInput.md b/sdks/java/docs/VariableUpdateAssignmentInput.md new file mode 100644 index 000000000..10a568712 --- /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" | +| CLEAR | "CLEAR" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/VariableUpdateScopeInput.md b/sdks/java/docs/VariableUpdateScopeInput.md new file mode 100644 index 000000000..a1e2a1d7a --- /dev/null +++ b/sdks/java/docs/VariableUpdateScopeInput.md @@ -0,0 +1,31 @@ + + +# VariableUpdateScopeInput + +Input for variable value update in batch operations + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**orgIdentifier** | **String** | The unique name of the org | | +|**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/VariableValue.md b/sdks/java/docs/VariableValue.md index 6c324d576..01bee0cc2 100644 --- a/sdks/java/docs/VariableValue.md +++ b/sdks/java/docs/VariableValue.md @@ -8,6 +8,7 @@ | 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) | Principal type | [optional] | |**principalIdentifier** | **String** | Unique ID or name of the principal | [optional] | 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/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..0ff44c435 --- /dev/null +++ b/sdks/java/docs/WebhookResponse.md @@ -0,0 +1,37 @@ + + +# 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] | +|**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] | + + + +## 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/pom.xml b/sdks/java/pom.xml index 957a9a258..6d9651240 100644 --- a/sdks/java/pom.xml +++ b/sdks/java/pom.xml @@ -4,7 +4,7 @@ com.thoughtspot rest-api-sdk - 2.18.0 + 2.19.0 jar rest-api-sdk diff --git a/sdks/java/src/main/java/com/thoughtspot/client/ApiClient.java b/sdks/java/src/main/java/com/thoughtspot/client/ApiClient.java index 3e7ad8a4e..7b557e687 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/ApiClient.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/ApiClient.java @@ -182,7 +182,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("ThoughtSpot-Client/java/2.18.0"); + setUserAgent("ThoughtSpot-Client/java/2.19.0"); authentications = new HashMap(); } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/Configuration.java b/sdks/java/src/main/java/com/thoughtspot/client/Configuration.java index 0abcbf52e..96b8539de 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/Configuration.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/Configuration.java @@ -8,7 +8,7 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class Configuration { - public static final String VERSION = "2.18.0"; + public static final String VERSION = "2.19.0"; private static volatile ApiClient defaultApiClient = new ApiClient(); diff --git a/sdks/java/src/main/java/com/thoughtspot/client/JSON.java b/sdks/java/src/main/java/com/thoughtspot/client/JSON.java index c747314da..2aba06554 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/JSON.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/JSON.java @@ -187,6 +187,12 @@ private static Class getClassByDiscriminator( 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.ConfigureCommunicationChannelPreferencesRequest + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.ConnectionConfigurationResponse .CustomTypeAdapterFactory()); @@ -249,6 +255,9 @@ private static Class getClassByDiscriminator( 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( @@ -298,6 +307,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.DeleteOrgEmailCustomizationRequest .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DeleteWebhookConfigurationsRequest + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.DeployCommitRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( @@ -323,6 +335,11 @@ private static Class getClassByDiscriminator( .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.EurekaRelevantQuestion.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()); @@ -446,8 +463,6 @@ private static Class getClassByDiscriminator( new com.thoughtspot.client.model.ImportUsersResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.InputEurekaNLSRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.thoughtspot.client.model.InputVariableValue.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.JWTMetadataObject.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( @@ -494,8 +509,18 @@ private static Class getClassByDiscriminator( new com.thoughtspot.client.model.ObjectIDAndName.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.OrgPreferenceSearchCriteriaInput + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.OrgResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( @@ -632,6 +657,9 @@ private static Class getClassByDiscriminator( new com.thoughtspot.client.model.SearchCalendarsRequest.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( @@ -669,6 +697,12 @@ private static Class getClassByDiscriminator( 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.SendAgentMessageRequest + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.SendAgentMessageResponse .CustomTypeAdapterFactory()); @@ -781,6 +815,9 @@ private static Class getClassByDiscriminator( 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( @@ -799,14 +836,61 @@ private static Class getClassByDiscriminator( 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.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.VariableValueInput.CustomTypeAdapterFactory()); + 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.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(); } 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 index e177b9564..7827f3495 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/AiApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/AiApi.java @@ -23,6 +23,7 @@ import com.thoughtspot.client.model.GetRelevantQuestionsRequest; import com.thoughtspot.client.model.QueryGetDecomposedQueryRequest; import com.thoughtspot.client.model.ResponseMessage; +import com.thoughtspot.client.model.SendAgentMessageRequest; import com.thoughtspot.client.model.SendAgentMessageResponse; import com.thoughtspot.client.model.SendAgentMessageStreamingRequest; import com.thoughtspot.client.model.SendMessageRequest; @@ -1054,6 +1055,234 @@ public okhttp3.Call queryGetDecomposedQueryAsync( 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 -
500 Operation failed -
+ */ + 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); + } + + @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: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) + * conversation by submitting one or more natural language messages. To use this API, the user + * must have access to the relevant conversational session (via conversation_identifier) and + * submit at least one message. #### Usage guidelines To initiate or continue a conversation, + * the request must include: - `conversation_identifier`: a unique session ID for + * continuity and message tracking - `messages`: an array of one or more text + * messages, each with a value and type The API returns a array of object with a type, message, + * and metadata. - `type`: Type of the message — text, answer, or error. - + * `message`: Main content of the response. - `metadata`: Additional info + * depending on the message type. > ###### 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 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 -
500 Operation failed -
+ */ + public Object sendAgentMessage( + String conversationIdentifier, SendAgentMessageRequest sendAgentMessageRequest) + throws ApiException { + ApiResponse localVarResp = + sendAgentMessageWithHttpInfo(conversationIdentifier, sendAgentMessageRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) + * conversation by submitting one or more natural language messages. To use this API, the user + * must have access to the relevant conversational session (via conversation_identifier) and + * submit at least one message. #### Usage guidelines To initiate or continue a conversation, + * the request must include: - `conversation_identifier`: a unique session ID for + * continuity and message tracking - `messages`: an array of one or more text + * messages, each with a value and type The API returns a array of object with a type, message, + * and metadata. - `type`: Type of the message — text, answer, or error. - + * `message`: Main content of the response. - `metadata`: Additional info + * depending on the message type. > ###### 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 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 -
500 Operation failed -
+ */ + 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: 10.13.0.cl or later This API allows users to initiate or continue + * an agent (Spotter) conversation by submitting one or more natural language messages. To use + * this API, the user must have access to the relevant conversational session (via + * conversation_identifier) and submit at least one message. #### Usage guidelines To initiate + * or continue a conversation, the request must include: - `conversation_identifier`: + * a unique session ID for continuity and message tracking - `messages`: an array of + * one or more text messages, each with a value and type The API returns a array of object with + * a type, message, and metadata. - `type`: Type of the message — text, answer, or + * error. - `message`: Main content of the response. - `metadata`: + * Additional info depending on the message type. > ###### 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 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 -
500 Operation failed -
+ */ + 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 * 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 index 662a72e79..61db74c85 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/AuthenticationApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/AuthenticationApi.java @@ -525,8 +525,7 @@ private okhttp3.Call getCustomAccessTokenValidateBeforeCall( * persist on a specific set of objects for user sessions initiated using the token. Once * defined, the rules are added to the user's `access_control_properties` object, * after which all sessions will use the persisted values. Specify the object type as - * `LOGICAL_TABLE`. The `LIVEBOARD` and `ANSWER` object types are - * not supported. For more information, see [ABAC via tokens + * `LOGICAL_TABLE`. For more information, see [ABAC via tokens * Documentation](https://developers.thoughtspot.com/docs/api-authv2#_get_tokens_with_custom_rules_and_filter_conditions). * ##### Just-in-time provisioning For just-in-time user creation and provisioning, define the * following attributes: * `auto_create` * `username` * @@ -534,7 +533,9 @@ private okhttp3.Call getCustomAccessTokenValidateBeforeCall( * 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` in the * API request, the user properties such as the display name, email, Org and group assignment - * will not be updated with new values. For more information, see [Just-in-time + * will not be updated with new values. If `auto_create` is set to `true`, + * it won't create formula variables and hence won't be applicable for + * `variable_values`. For more information, see [Just-in-time * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). ##### * Important point to note All options in the token creation APIs that define access to the * content in ThoughtSpot will do so during the token creation and not when the token is being @@ -542,7 +543,13 @@ private okhttp3.Call getCustomAccessTokenValidateBeforeCall( * the authentication token is created. Persist options such as `APPEND`, * `REPLACE`, `RESET` will persist security parameters on the user profile * when the token is created, while Persist option `NONE` will not persist anything - * but will be honoured in the session. + * but will be honoured in the session. ##### Formula Variables Before using variables_values, + * variables must be created using Create Variable API with type as Formula_Variable + * (/api/rest/2.0/template/variables/create) The persist_option RESET and NONE cannot be used + * when variable_values are provided in the request. If you are working with variable_values, + * you must use other (APPEND, REPLACE) supported modes. If you want to use RESET or NONE, do + * not pass any variable_values. In such cases, variable_values will remain unaffected. When + * using object_id with variable_values, models are supported. * * @param getCustomAccessTokenRequest (required) * @return AccessToken @@ -597,8 +604,7 @@ public AccessToken getCustomAccessToken(GetCustomAccessTokenRequest getCustomAcc * persist on a specific set of objects for user sessions initiated using the token. Once * defined, the rules are added to the user's `access_control_properties` object, * after which all sessions will use the persisted values. Specify the object type as - * `LOGICAL_TABLE`. The `LIVEBOARD` and `ANSWER` object types are - * not supported. For more information, see [ABAC via tokens + * `LOGICAL_TABLE`. For more information, see [ABAC via tokens * Documentation](https://developers.thoughtspot.com/docs/api-authv2#_get_tokens_with_custom_rules_and_filter_conditions). * ##### Just-in-time provisioning For just-in-time user creation and provisioning, define the * following attributes: * `auto_create` * `username` * @@ -606,7 +612,9 @@ public AccessToken getCustomAccessToken(GetCustomAccessTokenRequest getCustomAcc * 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` in the * API request, the user properties such as the display name, email, Org and group assignment - * will not be updated with new values. For more information, see [Just-in-time + * will not be updated with new values. If `auto_create` is set to `true`, + * it won't create formula variables and hence won't be applicable for + * `variable_values`. For more information, see [Just-in-time * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). ##### * Important point to note All options in the token creation APIs that define access to the * content in ThoughtSpot will do so during the token creation and not when the token is being @@ -614,7 +622,13 @@ public AccessToken getCustomAccessToken(GetCustomAccessTokenRequest getCustomAcc * the authentication token is created. Persist options such as `APPEND`, * `REPLACE`, `RESET` will persist security parameters on the user profile * when the token is created, while Persist option `NONE` will not persist anything - * but will be honoured in the session. + * but will be honoured in the session. ##### Formula Variables Before using variables_values, + * variables must be created using Create Variable API with type as Formula_Variable + * (/api/rest/2.0/template/variables/create) The persist_option RESET and NONE cannot be used + * when variable_values are provided in the request. If you are working with variable_values, + * you must use other (APPEND, REPLACE) supported modes. If you want to use RESET or NONE, do + * not pass any variable_values. In such cases, variable_values will remain unaffected. When + * using object_id with variable_values, models are supported. * * @param getCustomAccessTokenRequest (required) * @return ApiResponse<AccessToken> @@ -670,8 +684,7 @@ public ApiResponse getCustomAccessTokenWithHttpInfo( * persist on a specific set of objects for user sessions initiated using the token. Once * defined, the rules are added to the user's `access_control_properties` object, * after which all sessions will use the persisted values. Specify the object type as - * `LOGICAL_TABLE`. The `LIVEBOARD` and `ANSWER` object types are - * not supported. For more information, see [ABAC via tokens + * `LOGICAL_TABLE`. For more information, see [ABAC via tokens * Documentation](https://developers.thoughtspot.com/docs/api-authv2#_get_tokens_with_custom_rules_and_filter_conditions). * ##### Just-in-time provisioning For just-in-time user creation and provisioning, define the * following attributes: * `auto_create` * `username` * @@ -679,7 +692,9 @@ public ApiResponse getCustomAccessTokenWithHttpInfo( * 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` in the * API request, the user properties such as the display name, email, Org and group assignment - * will not be updated with new values. For more information, see [Just-in-time + * will not be updated with new values. If `auto_create` is set to `true`, + * it won't create formula variables and hence won't be applicable for + * `variable_values`. For more information, see [Just-in-time * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). ##### * Important point to note All options in the token creation APIs that define access to the * content in ThoughtSpot will do so during the token creation and not when the token is being @@ -687,7 +702,13 @@ public ApiResponse getCustomAccessTokenWithHttpInfo( * the authentication token is created. Persist options such as `APPEND`, * `REPLACE`, `RESET` will persist security parameters on the user profile * when the token is created, while Persist option `NONE` will not persist anything - * but will be honoured in the session. + * but will be honoured in the session. ##### Formula Variables Before using variables_values, + * variables must be created using Create Variable API with type as Formula_Variable + * (/api/rest/2.0/template/variables/create) The persist_option RESET and NONE cannot be used + * when variable_values are provided in the request. If you are working with variable_values, + * you must use other (APPEND, REPLACE) supported modes. If you want to use RESET or NONE, do + * not pass any variable_values. In such cases, variable_values will remain unaffected. When + * using object_id with variable_values, models are supported. * * @param getCustomAccessTokenRequest (required) * @param _callback The callback to be executed when the API call finishes 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 index abdaa072b..13ab69023 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/ConnectionsApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/ConnectionsApi.java @@ -1839,31 +1839,71 @@ private okhttp3.Call updateConnectionV2ValidateBeforeCall( * 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: ``` { - * \"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\" } ] } ] } ] } ] } ``` 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` 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\", @@ -1906,31 +1946,71 @@ public void updateConnectionV2( * 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: ``` { - * \"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\" } ] } ] } ] } ] } ``` 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` 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\", @@ -1977,32 +2057,71 @@ public ApiResponse updateConnectionV2WithHttpInfo( * 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: - * ``` { \"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\" } ] } ] } ] } ] } ``` 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 + * 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\", 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 index 781fdc75f..c5a0ec798 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/DbtApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/DbtApi.java @@ -677,10 +677,12 @@ public okhttp3.Call dbtGenerateSyncTmlAsync( * 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 modelTables List of Models and their respective Tables (optional) * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED - * (optional) + * 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 @@ -699,8 +701,8 @@ public okhttp3.Call dbtGenerateSyncTmlAsync( */ public okhttp3.Call dbtGenerateTmlCall( String dbtConnectionIdentifier, - String importWorksheets, String modelTables, + String importWorksheets, String worksheets, File fileContent, final ApiCallback _callback) @@ -780,8 +782,8 @@ public okhttp3.Call dbtGenerateTmlCall( @SuppressWarnings("rawtypes") private okhttp3.Call dbtGenerateTmlValidateBeforeCall( String dbtConnectionIdentifier, - String importWorksheets, String modelTables, + String importWorksheets, String worksheets, File fileContent, final ApiCallback _callback) @@ -793,6 +795,13 @@ private okhttp3.Call dbtGenerateTmlValidateBeforeCall( + " 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( @@ -802,8 +811,8 @@ private okhttp3.Call dbtGenerateTmlValidateBeforeCall( return dbtGenerateTmlCall( dbtConnectionIdentifier, - importWorksheets, modelTables, + importWorksheets, worksheets, fileContent, _callback); @@ -823,10 +832,12 @@ private okhttp3.Call dbtGenerateTmlValidateBeforeCall( * 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 modelTables List of Models and their respective Tables (optional) * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED - * (optional) + * 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 @@ -845,16 +856,16 @@ private okhttp3.Call dbtGenerateTmlValidateBeforeCall( */ public Object dbtGenerateTml( String dbtConnectionIdentifier, - String importWorksheets, String modelTables, + String importWorksheets, String worksheets, File fileContent) throws ApiException { ApiResponse localVarResp = dbtGenerateTmlWithHttpInfo( dbtConnectionIdentifier, - importWorksheets, modelTables, + importWorksheets, worksheets, fileContent); return localVarResp.getData(); @@ -874,10 +885,12 @@ public Object dbtGenerateTml( * 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 modelTables List of Models and their respective Tables (optional) * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED - * (optional) + * 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> @@ -896,16 +909,16 @@ public Object dbtGenerateTml( */ public ApiResponse dbtGenerateTmlWithHttpInfo( String dbtConnectionIdentifier, - String importWorksheets, String modelTables, + String importWorksheets, String worksheets, File fileContent) throws ApiException { okhttp3.Call localVarCall = dbtGenerateTmlValidateBeforeCall( dbtConnectionIdentifier, - importWorksheets, modelTables, + importWorksheets, worksheets, fileContent, null); @@ -927,10 +940,12 @@ public ApiResponse dbtGenerateTmlWithHttpInfo( * 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 modelTables List of Models and their respective Tables (optional) * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED - * (optional) + * 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 @@ -950,8 +965,8 @@ public ApiResponse dbtGenerateTmlWithHttpInfo( */ public okhttp3.Call dbtGenerateTmlAsync( String dbtConnectionIdentifier, - String importWorksheets, String modelTables, + String importWorksheets, String worksheets, File fileContent, final ApiCallback _callback) @@ -960,8 +975,8 @@ public okhttp3.Call dbtGenerateTmlAsync( okhttp3.Call localVarCall = dbtGenerateTmlValidateBeforeCall( dbtConnectionIdentifier, - importWorksheets, modelTables, + importWorksheets, worksheets, fileContent, _callback); 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 index 57cf57bd6..6b80f3f96 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/MetadataApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/MetadataApi.java @@ -456,9 +456,9 @@ private okhttp3.Call copyObjectValidateBeforeCall( } /** - * Makes a copy of an Answer or Liveboard saved in Atlas 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 + * 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) @@ -483,9 +483,9 @@ public ResponseCopyObject copyObject(CopyObjectRequest copyObjectRequest) throws } /** - * Makes a copy of an Answer or Liveboard saved in Atlas 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 + * 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) @@ -512,10 +512,10 @@ public ApiResponse copyObjectWithHttpInfo( } /** - * (asynchronously) Makes a copy of an Answer or Liveboard saved in Atlas 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. + * (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 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 index c5b0f0bf5..93cd7366b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/SystemApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/SystemApi.java @@ -12,6 +12,9 @@ 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.ConfigureCommunicationChannelPreferencesRequest; +import com.thoughtspot.client.model.SearchCommunicationChannelPreferencesRequest; import com.thoughtspot.client.model.SystemConfig; import com.thoughtspot.client.model.SystemInfo; import com.thoughtspot.client.model.SystemOverrideInfo; @@ -81,6 +84,210 @@ 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 getSystemConfig * @@ -570,6 +777,217 @@ public okhttp3.Call getSystemOverrideInfoAsync(final ApiCallback + * 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 updateSystemConfig * 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 index d234818e3..3a4c5b710 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/ThoughtSpotRestApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/ThoughtSpotRestApi.java @@ -24,6 +24,8 @@ 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.ConfigureCommunicationChannelPreferencesRequest; import com.thoughtspot.client.model.ConnectionConfigurationResponse; import com.thoughtspot.client.model.ConnectionConfigurationSearchRequest; import com.thoughtspot.client.model.Conversation; @@ -46,6 +48,7 @@ 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.DeleteConfigRequest; @@ -53,6 +56,7 @@ import com.thoughtspot.client.model.DeleteConnectionRequest; import com.thoughtspot.client.model.DeleteMetadataRequest; import com.thoughtspot.client.model.DeleteOrgEmailCustomizationRequest; +import com.thoughtspot.client.model.DeleteWebhookConfigurationsRequest; import com.thoughtspot.client.model.DeployCommitRequest; import com.thoughtspot.client.model.DeployResponse; import com.thoughtspot.client.model.EurekaDataSourceSuggestionResponse; @@ -112,6 +116,7 @@ import com.thoughtspot.client.model.RoleResponse; import com.thoughtspot.client.model.SearchCalendarsRequest; 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; @@ -128,6 +133,8 @@ 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.SendAgentMessageRequest; import com.thoughtspot.client.model.SendAgentMessageResponse; import com.thoughtspot.client.model.SendAgentMessageStreamingRequest; import com.thoughtspot.client.model.SendMessageRequest; @@ -161,11 +168,15 @@ 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.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; @@ -1102,6 +1113,210 @@ public okhttp3.Call commitBranchAsync( localVarApiClient.executeAsync(localVarCall, localVarReturnType, _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 connectionConfigurationSearch * @@ -1661,9 +1876,9 @@ private okhttp3.Call copyObjectValidateBeforeCall( } /** - * Makes a copy of an Answer or Liveboard saved in Atlas 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 + * 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) @@ -1688,9 +1903,9 @@ public ResponseCopyObject copyObject(CopyObjectRequest copyObjectRequest) throws } /** - * Makes a copy of an Answer or Liveboard saved in Atlas 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 + * 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) @@ -1717,10 +1932,10 @@ public ApiResponse copyObjectWithHttpInfo( } /** - * (asynchronously) Makes a copy of an Answer or Liveboard saved in Atlas 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. + * (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 @@ -4813,17 +5028,18 @@ private okhttp3.Call createVariableValidateBeforeCall( } /** - * Create a variable which can be used for parameterizing metadata objects Version: 10.9.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 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 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 fomula variables - * (defaults to null) The operation will fail if: * The user lacks required permissions * The - * variable name already exists * The variable type is invalid + * Create a variable which can be used for parameterizing metadata objects Version: 10.14.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 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 fomula + * 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 @@ -4847,17 +5063,18 @@ public Variable createVariable(CreateVariableRequest createVariableRequest) } /** - * Create a variable which can be used for parameterizing metadata objects Version: 10.9.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 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 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 fomula variables - * (defaults to null) The operation will fail if: * The user lacks required permissions * The - * variable name already exists * The variable type is invalid + * Create a variable which can be used for parameterizing metadata objects Version: 10.14.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 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 fomula + * 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> @@ -4883,16 +5100,18 @@ public ApiResponse createVariableWithHttpInfo( /** * (asynchronously) Create a variable which can be used for parameterizing metadata objects - * Version: 10.9.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 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 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 fomula - * variables (defaults to null) The operation will fail if: * The user lacks required - * permissions * The variable name already exists * The variable type is invalid + * Version: 10.14.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 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 fomula 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 @@ -4921,19 +5140,9 @@ public okhttp3.Call createVariableAsync( return localVarCall; } /** - * Build call for dbtConnection + * Build call for createWebhookConfiguration * - * @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 createWebhookConfigurationRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -4941,24 +5150,15 @@ public okhttp3.Call createVariableAsync( * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
200 Succesfully created DBT Connection. -
200 Webhook configuration created successfully -
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, + public okhttp3.Call createWebhookConfigurationCall( + CreateWebhookConfigurationRequest createWebhookConfigurationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -4974,10 +5174,10 @@ public okhttp3.Call dbtConnectionCall( basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = createWebhookConfigurationRequest; // create path and map variables - String localVarPath = "/api/rest/2.0/dbt/dbt-connection"; + String localVarPath = "/api/rest/2.0/webhooks/create"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4985,53 +5185,13 @@ public okhttp3.Call dbtConnectionCall( 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[] localVarContentTypes = {"application/json"}; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -5054,32 +5214,283 @@ public okhttp3.Call dbtConnectionCall( } @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, + private okhttp3.Call createWebhookConfigurationValidateBeforeCall( + CreateWebhookConfigurationRequest createWebhookConfigurationRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionName' is set - if (connectionName == null) { + // verify the required parameter 'createWebhookConfigurationRequest' is set + if (createWebhookConfigurationRequest == null) { throw new ApiException( - "Missing the required parameter 'connectionName' when calling" - + " dbtConnection(Async)"); + "Missing the required parameter 'createWebhookConfigurationRequest' when" + + " calling createWebhookConfiguration(Async)"); } - // verify the required parameter 'databaseName' is set - if (databaseName == null) { - throw new ApiException( - "Missing the required parameter 'databaseName' when calling" - + " dbtConnection(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, @@ -5518,10 +5929,12 @@ public okhttp3.Call dbtGenerateSyncTmlAsync( * 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 modelTables List of Models and their respective Tables (optional) * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED - * (optional) + * 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 @@ -5540,8 +5953,8 @@ public okhttp3.Call dbtGenerateSyncTmlAsync( */ public okhttp3.Call dbtGenerateTmlCall( String dbtConnectionIdentifier, - String importWorksheets, String modelTables, + String importWorksheets, String worksheets, File fileContent, final ApiCallback _callback) @@ -5621,8 +6034,8 @@ public okhttp3.Call dbtGenerateTmlCall( @SuppressWarnings("rawtypes") private okhttp3.Call dbtGenerateTmlValidateBeforeCall( String dbtConnectionIdentifier, - String importWorksheets, String modelTables, + String importWorksheets, String worksheets, File fileContent, final ApiCallback _callback) @@ -5634,6 +6047,13 @@ private okhttp3.Call dbtGenerateTmlValidateBeforeCall( + " 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( @@ -5643,8 +6063,8 @@ private okhttp3.Call dbtGenerateTmlValidateBeforeCall( return dbtGenerateTmlCall( dbtConnectionIdentifier, - importWorksheets, modelTables, + importWorksheets, worksheets, fileContent, _callback); @@ -5664,10 +6084,12 @@ private okhttp3.Call dbtGenerateTmlValidateBeforeCall( * 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 modelTables List of Models and their respective Tables (optional) * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED - * (optional) + * 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 @@ -5686,16 +6108,16 @@ private okhttp3.Call dbtGenerateTmlValidateBeforeCall( */ public Object dbtGenerateTml( String dbtConnectionIdentifier, - String importWorksheets, String modelTables, + String importWorksheets, String worksheets, File fileContent) throws ApiException { ApiResponse localVarResp = dbtGenerateTmlWithHttpInfo( dbtConnectionIdentifier, - importWorksheets, modelTables, + importWorksheets, worksheets, fileContent); return localVarResp.getData(); @@ -5715,10 +6137,12 @@ public Object dbtGenerateTml( * 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 modelTables List of Models and their respective Tables (optional) * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED - * (optional) + * 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> @@ -5737,16 +6161,16 @@ public Object dbtGenerateTml( */ public ApiResponse dbtGenerateTmlWithHttpInfo( String dbtConnectionIdentifier, - String importWorksheets, String modelTables, + String importWorksheets, String worksheets, File fileContent) throws ApiException { okhttp3.Call localVarCall = dbtGenerateTmlValidateBeforeCall( dbtConnectionIdentifier, - importWorksheets, modelTables, + importWorksheets, worksheets, fileContent, null); @@ -5768,10 +6192,12 @@ public ApiResponse dbtGenerateTmlWithHttpInfo( * 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 modelTables List of Models and their respective Tables (optional) * @param worksheets List of worksheets is mandatory when import_Worksheets is type SELECTED - * (optional) + * 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 @@ -5791,8 +6217,8 @@ public ApiResponse dbtGenerateTmlWithHttpInfo( */ public okhttp3.Call dbtGenerateTmlAsync( String dbtConnectionIdentifier, - String importWorksheets, String modelTables, + String importWorksheets, String worksheets, File fileContent, final ApiCallback _callback) @@ -5801,8 +6227,8 @@ public okhttp3.Call dbtGenerateTmlAsync( okhttp3.Call localVarCall = dbtGenerateTmlValidateBeforeCall( dbtConnectionIdentifier, - importWorksheets, modelTables, + importWorksheets, worksheets, fileContent, _callback); @@ -9137,10 +9563,11 @@ private okhttp3.Call deleteVariableValidateBeforeCall( } /** - * Delete a variable Version: 10.9.0.cl or later Allows deleting a variable from ThoughtSpot. - * Requires ADMINISTRATION role and TENANT 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 + * Delete a variable Version: 10.14.0.cl or later 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 @@ -9161,10 +9588,11 @@ public void deleteVariable(String identifier) throws ApiException { } /** - * Delete a variable Version: 10.9.0.cl or later Allows deleting a variable from ThoughtSpot. - * Requires ADMINISTRATION role and TENANT 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 + * Delete a variable Version: 10.14.0.cl or later 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> @@ -9187,10 +9615,12 @@ public ApiResponse deleteVariableWithHttpInfo(String identifier) throws Ap } /** - * (asynchronously) Delete a variable Version: 10.9.0.cl or later Allows deleting a variable - * from ThoughtSpot. Requires ADMINISTRATION role and TENANT 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 + * (asynchronously) Delete a variable Version: 10.14.0.cl or later 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 @@ -9216,9 +9646,9 @@ public okhttp3.Call deleteVariableAsync(String identifier, final ApiCallback * Response Details * Status Code Description Response Headers - * 200 Successfully deployed the changes - + * 200 Webhook configurations deleted successfully - * 400 Invalid request. - * 401 Unauthorized access. - * 403 Forbidden access. - * 500 Unexpected error - * */ - public okhttp3.Call deployCommitCall( - DeployCommitRequest deployCommitRequest, final ApiCallback _callback) + 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 @@ -13333,8 +13956,7 @@ private okhttp3.Call getCustomAccessTokenValidateBeforeCall( * persist on a specific set of objects for user sessions initiated using the token. Once * defined, the rules are added to the user's `access_control_properties` object, * after which all sessions will use the persisted values. Specify the object type as - * `LOGICAL_TABLE`. The `LIVEBOARD` and `ANSWER` object types are - * not supported. For more information, see [ABAC via tokens + * `LOGICAL_TABLE`. For more information, see [ABAC via tokens * Documentation](https://developers.thoughtspot.com/docs/api-authv2#_get_tokens_with_custom_rules_and_filter_conditions). * ##### Just-in-time provisioning For just-in-time user creation and provisioning, define the * following attributes: * `auto_create` * `username` * @@ -13342,7 +13964,9 @@ private okhttp3.Call getCustomAccessTokenValidateBeforeCall( * 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` in the * API request, the user properties such as the display name, email, Org and group assignment - * will not be updated with new values. For more information, see [Just-in-time + * will not be updated with new values. If `auto_create` is set to `true`, + * it won't create formula variables and hence won't be applicable for + * `variable_values`. For more information, see [Just-in-time * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). ##### * Important point to note All options in the token creation APIs that define access to the * content in ThoughtSpot will do so during the token creation and not when the token is being @@ -13350,7 +13974,13 @@ private okhttp3.Call getCustomAccessTokenValidateBeforeCall( * the authentication token is created. Persist options such as `APPEND`, * `REPLACE`, `RESET` will persist security parameters on the user profile * when the token is created, while Persist option `NONE` will not persist anything - * but will be honoured in the session. + * but will be honoured in the session. ##### Formula Variables Before using variables_values, + * variables must be created using Create Variable API with type as Formula_Variable + * (/api/rest/2.0/template/variables/create) The persist_option RESET and NONE cannot be used + * when variable_values are provided in the request. If you are working with variable_values, + * you must use other (APPEND, REPLACE) supported modes. If you want to use RESET or NONE, do + * not pass any variable_values. In such cases, variable_values will remain unaffected. When + * using object_id with variable_values, models are supported. * * @param getCustomAccessTokenRequest (required) * @return AccessToken @@ -13405,8 +14035,7 @@ public AccessToken getCustomAccessToken(GetCustomAccessTokenRequest getCustomAcc * persist on a specific set of objects for user sessions initiated using the token. Once * defined, the rules are added to the user's `access_control_properties` object, * after which all sessions will use the persisted values. Specify the object type as - * `LOGICAL_TABLE`. The `LIVEBOARD` and `ANSWER` object types are - * not supported. For more information, see [ABAC via tokens + * `LOGICAL_TABLE`. For more information, see [ABAC via tokens * Documentation](https://developers.thoughtspot.com/docs/api-authv2#_get_tokens_with_custom_rules_and_filter_conditions). * ##### Just-in-time provisioning For just-in-time user creation and provisioning, define the * following attributes: * `auto_create` * `username` * @@ -13414,7 +14043,9 @@ public AccessToken getCustomAccessToken(GetCustomAccessTokenRequest getCustomAcc * 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` in the * API request, the user properties such as the display name, email, Org and group assignment - * will not be updated with new values. For more information, see [Just-in-time + * will not be updated with new values. If `auto_create` is set to `true`, + * it won't create formula variables and hence won't be applicable for + * `variable_values`. For more information, see [Just-in-time * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). ##### * Important point to note All options in the token creation APIs that define access to the * content in ThoughtSpot will do so during the token creation and not when the token is being @@ -13422,7 +14053,13 @@ public AccessToken getCustomAccessToken(GetCustomAccessTokenRequest getCustomAcc * the authentication token is created. Persist options such as `APPEND`, * `REPLACE`, `RESET` will persist security parameters on the user profile * when the token is created, while Persist option `NONE` will not persist anything - * but will be honoured in the session. + * but will be honoured in the session. ##### Formula Variables Before using variables_values, + * variables must be created using Create Variable API with type as Formula_Variable + * (/api/rest/2.0/template/variables/create) The persist_option RESET and NONE cannot be used + * when variable_values are provided in the request. If you are working with variable_values, + * you must use other (APPEND, REPLACE) supported modes. If you want to use RESET or NONE, do + * not pass any variable_values. In such cases, variable_values will remain unaffected. When + * using object_id with variable_values, models are supported. * * @param getCustomAccessTokenRequest (required) * @return ApiResponse<AccessToken> @@ -13478,8 +14115,7 @@ public ApiResponse getCustomAccessTokenWithHttpInfo( * persist on a specific set of objects for user sessions initiated using the token. Once * defined, the rules are added to the user's `access_control_properties` object, * after which all sessions will use the persisted values. Specify the object type as - * `LOGICAL_TABLE`. The `LIVEBOARD` and `ANSWER` object types are - * not supported. For more information, see [ABAC via tokens + * `LOGICAL_TABLE`. For more information, see [ABAC via tokens * Documentation](https://developers.thoughtspot.com/docs/api-authv2#_get_tokens_with_custom_rules_and_filter_conditions). * ##### Just-in-time provisioning For just-in-time user creation and provisioning, define the * following attributes: * `auto_create` * `username` * @@ -13487,7 +14123,9 @@ public ApiResponse getCustomAccessTokenWithHttpInfo( * 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` in the * API request, the user properties such as the display name, email, Org and group assignment - * will not be updated with new values. For more information, see [Just-in-time + * will not be updated with new values. If `auto_create` is set to `true`, + * it won't create formula variables and hence won't be applicable for + * `variable_values`. For more information, see [Just-in-time * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). ##### * Important point to note All options in the token creation APIs that define access to the * content in ThoughtSpot will do so during the token creation and not when the token is being @@ -13495,7 +14133,13 @@ public ApiResponse getCustomAccessTokenWithHttpInfo( * the authentication token is created. Persist options such as `APPEND`, * `REPLACE`, `RESET` will persist security parameters on the user profile * when the token is created, while Persist option `NONE` will not persist anything - * but will be honoured in the session. + * but will be honoured in the session. ##### Formula Variables Before using variables_values, + * variables must be created using Create Variable API with type as Formula_Variable + * (/api/rest/2.0/template/variables/create) The persist_option RESET and NONE cannot be used + * when variable_values are provided in the request. If you are working with variable_values, + * you must use other (APPEND, REPLACE) supported modes. If you want to use RESET or NONE, do + * not pass any variable_values. In such cases, variable_values will remain unaffected. When + * using object_id with variable_values, models are supported. * * @param getCustomAccessTokenRequest (required) * @param _callback The callback to be executed when the API call finishes @@ -17567,9 +18211,9 @@ public okhttp3.Call searchCommitsAsync( return localVarCall; } /** - * Build call for searchConfig + * Build call for searchCommunicationChannelPreferences * - * @param searchConfigRequest (required) + * @param searchCommunicationChannelPreferencesRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -17577,15 +18221,17 @@ public okhttp3.Call searchCommitsAsync( * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
200 Details of local repository configuration -
200 Communication channel preferences retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchConfigCall( - SearchConfigRequest searchConfigRequest, final ApiCallback _callback) + public okhttp3.Call searchCommunicationChannelPreferencesCall( + SearchCommunicationChannelPreferencesRequest + searchCommunicationChannelPreferencesRequest, + final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers @@ -17600,10 +18246,10 @@ public okhttp3.Call searchConfigCall( basePath = null; } - Object localVarPostBody = searchConfigRequest; + Object localVarPostBody = searchCommunicationChannelPreferencesRequest; // create path and map variables - String localVarPath = "/api/rest/2.0/vcs/git/config/search"; + String localVarPath = "/api/rest/2.0/system/preferences/communication-channels/search"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -17640,86 +18286,112 @@ public okhttp3.Call searchConfigCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call searchConfigValidateBeforeCall( - SearchConfigRequest searchConfigRequest, final ApiCallback _callback) + private okhttp3.Call searchCommunicationChannelPreferencesValidateBeforeCall( + SearchCommunicationChannelPreferencesRequest + searchCommunicationChannelPreferencesRequest, + final ApiCallback _callback) throws ApiException { - // verify the required parameter 'searchConfigRequest' is set - if (searchConfigRequest == null) { + // verify the required parameter 'searchCommunicationChannelPreferencesRequest' is set + if (searchCommunicationChannelPreferencesRequest == null) { throw new ApiException( - "Missing the required parameter 'searchConfigRequest' when calling" - + " searchConfig(Async)"); + "Missing the required parameter 'searchCommunicationChannelPreferencesRequest'" + + " when calling searchCommunicationChannelPreferences(Async)"); } - return searchConfigCall(searchConfigRequest, _callback); + return searchCommunicationChannelPreferencesCall( + searchCommunicationChannelPreferencesRequest, _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. + * 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 searchConfigRequest (required) - * @return List<RepoConfigObject> + * @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 Details of local repository configuration -
200 Communication channel preferences retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public List searchConfig(SearchConfigRequest searchConfigRequest) + public CommunicationChannelPreferencesResponse searchCommunicationChannelPreferences( + SearchCommunicationChannelPreferencesRequest + searchCommunicationChannelPreferencesRequest) throws ApiException { - ApiResponse> localVarResp = - searchConfigWithHttpInfo(searchConfigRequest); + ApiResponse localVarResp = + searchCommunicationChannelPreferencesWithHttpInfo( + searchCommunicationChannelPreferencesRequest); 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. + * 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 searchConfigRequest (required) - * @return ApiResponse<List<RepoConfigObject>> + * @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 Details of local repository configuration -
200 Communication channel preferences retrieved successfully. -
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(); + 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: 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. + * (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 searchConfigRequest (required) + * @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 @@ -17728,27 +18400,31 @@ public ApiResponse> searchConfigWithHttpInfo( * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
200 Details of local repository configuration -
200 Communication channel preferences retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchConfigAsync( - SearchConfigRequest searchConfigRequest, - final ApiCallback> _callback) + public okhttp3.Call searchCommunicationChannelPreferencesAsync( + SearchCommunicationChannelPreferencesRequest + searchCommunicationChannelPreferencesRequest, + final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = searchConfigValidateBeforeCall(searchConfigRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + okhttp3.Call localVarCall = + searchCommunicationChannelPreferencesValidateBeforeCall( + searchCommunicationChannelPreferencesRequest, _callback); + Type localVarReturnType = + new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for searchConnection + * Build call for searchConfig * - * @param searchConnectionRequest (required) + * @param searchConfigRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -17756,15 +18432,15 @@ public okhttp3.Call searchConfigAsync( * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
200 List of connections to the datasource. -
200 Details of local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchConnectionCall( - SearchConnectionRequest searchConnectionRequest, final ApiCallback _callback) + public okhttp3.Call searchConfigCall( + SearchConfigRequest searchConfigRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers @@ -17779,10 +18455,10 @@ public okhttp3.Call searchConnectionCall( basePath = null; } - Object localVarPostBody = searchConnectionRequest; + Object localVarPostBody = searchConfigRequest; // create path and map variables - String localVarPath = "/api/rest/2.0/connection/search"; + String localVarPath = "/api/rest/2.0/vcs/git/config/search"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -17819,50 +18495,229 @@ public okhttp3.Call searchConnectionCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call searchConnectionValidateBeforeCall( - SearchConnectionRequest searchConnectionRequest, final ApiCallback _callback) + private okhttp3.Call searchConfigValidateBeforeCall( + SearchConfigRequest searchConfigRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'searchConnectionRequest' is set - if (searchConnectionRequest == null) { + // verify the required parameter 'searchConfigRequest' is set + if (searchConfigRequest == null) { throw new ApiException( - "Missing the required parameter 'searchConnectionRequest' when calling" - + " searchConnection(Async)"); + "Missing the required parameter 'searchConfigRequest' when calling" + + " searchConfig(Async)"); } - return searchConnectionCall(searchConnectionRequest, _callback); + return searchConfigCall(searchConfigRequest, _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 + * 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` @@ -20107,13 +20962,14 @@ private okhttp3.Call searchVariablesValidateBeforeCall( } /** - * Search variables Version: 10.9.0.cl or later Allows searching for variables in ThoughtSpot. - * Requires ADMINISTRATION role. 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_ONLY - Returns only - * variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values * - * EDITABLE_METADATA_AND_VALUES - Returns only editable variable metadata and values The values - * can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * Search variables Version: 10.14.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> @@ -20138,13 +20994,14 @@ public List searchVariables(SearchVariablesRequest searchVariablesRequ } /** - * Search variables Version: 10.9.0.cl or later Allows searching for variables in ThoughtSpot. - * Requires ADMINISTRATION role. 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_ONLY - Returns only - * variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values * - * EDITABLE_METADATA_AND_VALUES - Returns only editable variable metadata and values The values - * can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * Search variables Version: 10.14.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>> @@ -20169,16 +21026,438 @@ public ApiResponse> searchVariablesWithHttpInfo( } /** - * (asynchronously) Search variables Version: 10.9.0.cl or later Allows searching for variables - * in ThoughtSpot. Requires ADMINISTRATION role. 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_ONLY - - * Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata - * and values * EDITABLE_METADATA_AND_VALUES - Returns only editable variable metadata and - * values The values can be filtered by scope: * org_identifier * principal_identifier * - * model_identifier + * (asynchronously) Search variables Version: 10.14.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 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 -
500 Operation failed -
+ */ + 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); + } + + @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: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) + * conversation by submitting one or more natural language messages. To use this API, the user + * must have access to the relevant conversational session (via conversation_identifier) and + * submit at least one message. #### Usage guidelines To initiate or continue a conversation, + * the request must include: - `conversation_identifier`: a unique session ID for + * continuity and message tracking - `messages`: an array of one or more text + * messages, each with a value and type The API returns a array of object with a type, message, + * and metadata. - `type`: Type of the message — text, answer, or error. - + * `message`: Main content of the response. - `metadata`: Additional info + * depending on the message type. > ###### 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 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 -
500 Operation failed -
+ */ + public Object sendAgentMessage( + String conversationIdentifier, SendAgentMessageRequest sendAgentMessageRequest) + throws ApiException { + ApiResponse localVarResp = + sendAgentMessageWithHttpInfo(conversationIdentifier, sendAgentMessageRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) + * conversation by submitting one or more natural language messages. To use this API, the user + * must have access to the relevant conversational session (via conversation_identifier) and + * submit at least one message. #### Usage guidelines To initiate or continue a conversation, + * the request must include: - `conversation_identifier`: a unique session ID for + * continuity and message tracking - `messages`: an array of one or more text + * messages, each with a value and type The API returns a array of object with a type, message, + * and metadata. - `type`: Type of the message — text, answer, or error. - + * `message`: Main content of the response. - `metadata`: Additional info + * depending on the message type. > ###### 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 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 -
500 Operation failed -
+ */ + 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: 10.13.0.cl or later This API allows users to initiate or continue + * an agent (Spotter) conversation by submitting one or more natural language messages. To use + * this API, the user must have access to the relevant conversational session (via + * conversation_identifier) and submit at least one message. #### Usage guidelines To initiate + * or continue a conversation, the request must include: - `conversation_identifier`: + * a unique session ID for continuity and message tracking - `messages`: an array of + * one or more text messages, each with a value and type The API returns a array of object with + * a type, message, and metadata. - `type`: Type of the message — text, answer, or + * error. - `message`: Main content of the response. - `metadata`: + * Additional info depending on the message type. > ###### 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 searchVariablesRequest (required) + * @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 @@ -20187,21 +21466,22 @@ public ApiResponse> searchVariablesWithHttpInfo( * * * - * - * - * - * - * + * + * + * + * *
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 -
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
*/ - public okhttp3.Call searchVariablesAsync( - SearchVariablesRequest searchVariablesRequest, - final ApiCallback> _callback) + public okhttp3.Call sendAgentMessageAsync( + String conversationIdentifier, + SendAgentMessageRequest sendAgentMessageRequest, + final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - searchVariablesValidateBeforeCall(searchVariablesRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + sendAgentMessageValidateBeforeCall( + conversationIdentifier, sendAgentMessageRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -22842,31 +24122,71 @@ private okhttp3.Call updateConnectionV2ValidateBeforeCall( * 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: ``` { - * \"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\" } ] } ] } ] } ] } ``` 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` 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\", @@ -22909,31 +24229,71 @@ public void updateConnectionV2( * 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: ``` { - * \"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\" } ] } ] } ] } ] } ``` 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` 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\", @@ -22980,32 +24340,71 @@ public ApiResponse updateConnectionV2WithHttpInfo( * 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: - * ``` { \"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\" } ] } ] } ] } ] } ``` 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 + * 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\", @@ -25788,7 +27187,7 @@ public okhttp3.Call updateUserGroupAsync( * * * - * + * * * * @@ -25880,9 +27279,10 @@ private okhttp3.Call updateVariableValidateBeforeCall( } /** - * Update a variable's properties Version: 10.9.0.cl or later Allows updating a - * variable's properties in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The - * API endpoint allows updating: * The variable name + * Update a variable's name Version: 10.14.0.cl or later Allows updating a variable's + * properties 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) @@ -25892,7 +27292,7 @@ private okhttp3.Call updateVariableValidateBeforeCall( *
Response Details
Status Code Description Response Headers
204 Updating the variable is successful. -
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
* * - * + * * * * @@ -25905,9 +27305,10 @@ public void updateVariable(String identifier, UpdateVariableRequest updateVariab } /** - * Update a variable's properties Version: 10.9.0.cl or later Allows updating a - * variable's properties in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The - * API endpoint allows updating: * The variable name + * Update a variable's name Version: 10.14.0.cl or later Allows updating a variable's + * properties 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) @@ -25918,7 +27319,7 @@ public void updateVariable(String identifier, UpdateVariableRequest updateVariab *
Response Details
Status Code Description Response Headers
204 Updating the variable is successful. -
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
* * - * + * * * * @@ -25933,9 +27334,10 @@ public ApiResponse updateVariableWithHttpInfo( } /** - * (asynchronously) Update a variable's properties Version: 10.9.0.cl or later Allows - * updating a variable's properties in ThoughtSpot. Requires ADMINISTRATION role and TENANT - * scope. The API endpoint allows updating: * The variable name + * (asynchronously) Update a variable's name Version: 10.14.0.cl or later Allows updating a + * variable's properties 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) @@ -25947,7 +27349,7 @@ public ApiResponse updateVariableWithHttpInfo( *
Response Details
Status Code Description Response Headers
204 Updating the variable is successful. -
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
* * - * + * * * * @@ -25976,7 +27378,7 @@ public okhttp3.Call updateVariableAsync( *
Response Details
Status Code Description Response Headers
204 Updating the variable is successful. -
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
* * - * + * * * * @@ -26002,7 +27404,7 @@ public okhttp3.Call updateVariableValuesCall( Object localVarPostBody = updateVariableValuesRequest; // create path and map variables - String localVarPath = "/api/rest/2.0/template/variables/update"; + String localVarPath = "/api/rest/2.0/template/variables/update-values"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -26053,16 +27455,17 @@ private okhttp3.Call updateVariableValuesValidateBeforeCall( } /** - * Update values for multiple variables Version: 10.9.0.cl or later Allows updating values for - * multiple variables in ThoughtSpot. Requires ADMINISTRATION role. 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, - * CLEAR) 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. * CLEAR - - * Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later 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, CLEAR) 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. * CLEAR - 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 @@ -26071,7 +27474,7 @@ private okhttp3.Call updateVariableValuesValidateBeforeCall( *
Response Details
Status Code Description Response Headers
204 Updating variable values is successful. -
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
* * - * + * * * * @@ -26084,16 +27487,17 @@ public void updateVariableValues(UpdateVariableValuesRequest updateVariableValue } /** - * Update values for multiple variables Version: 10.9.0.cl or later Allows updating values for - * multiple variables in ThoughtSpot. Requires ADMINISTRATION role. 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, - * CLEAR) 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. * CLEAR - - * Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later 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, CLEAR) 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. * CLEAR - Removes all constrains for a given variable, scope is ignored * * @param updateVariableValuesRequest (required) * @return ApiResponse<Void> @@ -26103,7 +27507,7 @@ public void updateVariableValues(UpdateVariableValuesRequest updateVariableValue *
Response Details
Status Code Description Response Headers
204 Updating variable values is successful. -
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
* * - * + * * * * @@ -26118,16 +27522,18 @@ public ApiResponse updateVariableValuesWithHttpInfo( } /** - * (asynchronously) Update values for multiple variables Version: 10.9.0.cl or later Allows - * updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. 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, CLEAR) 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. * CLEAR - Removes all constrains for a given variable, scope is ignored + * (asynchronously) Update values for multiple variables Version: 10.14.0.cl or later 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, CLEAR) 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. * CLEAR - 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 @@ -26138,7 +27544,7 @@ public ApiResponse updateVariableValuesWithHttpInfo( *
Response Details
Status Code Description Response Headers
204 Updating variable values is successful. -
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
* * - * + * * * * @@ -26155,6 +27561,213 @@ public okhttp3.Call updateVariableValuesAsync( 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 Updating variable values is successful. -
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
+ * + * + * + * + * + * + * + *
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 validateEmailCustomization * 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 index a274751eb..192121e4a 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/VariableApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/VariableApi.java @@ -170,17 +170,18 @@ private okhttp3.Call createVariableValidateBeforeCall( } /** - * Create a variable which can be used for parameterizing metadata objects Version: 10.9.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 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 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 fomula variables - * (defaults to null) The operation will fail if: * The user lacks required permissions * The - * variable name already exists * The variable type is invalid + * Create a variable which can be used for parameterizing metadata objects Version: 10.14.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 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 fomula + * 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 @@ -204,17 +205,18 @@ public Variable createVariable(CreateVariableRequest createVariableRequest) } /** - * Create a variable which can be used for parameterizing metadata objects Version: 10.9.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 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 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 fomula variables - * (defaults to null) The operation will fail if: * The user lacks required permissions * The - * variable name already exists * The variable type is invalid + * Create a variable which can be used for parameterizing metadata objects Version: 10.14.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 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 fomula + * 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> @@ -240,16 +242,18 @@ public ApiResponse createVariableWithHttpInfo( /** * (asynchronously) Create a variable which can be used for parameterizing metadata objects - * Version: 10.9.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 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 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 fomula - * variables (defaults to null) The operation will fail if: * The user lacks required - * permissions * The variable name already exists * The variable type is invalid + * Version: 10.14.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 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 fomula 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 @@ -367,10 +371,11 @@ private okhttp3.Call deleteVariableValidateBeforeCall( } /** - * Delete a variable Version: 10.9.0.cl or later Allows deleting a variable from ThoughtSpot. - * Requires ADMINISTRATION role and TENANT 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 + * Delete a variable Version: 10.14.0.cl or later 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 @@ -391,10 +396,11 @@ public void deleteVariable(String identifier) throws ApiException { } /** - * Delete a variable Version: 10.9.0.cl or later Allows deleting a variable from ThoughtSpot. - * Requires ADMINISTRATION role and TENANT 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 + * Delete a variable Version: 10.14.0.cl or later 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> @@ -417,10 +423,12 @@ public ApiResponse deleteVariableWithHttpInfo(String identifier) throws Ap } /** - * (asynchronously) Delete a variable Version: 10.9.0.cl or later Allows deleting a variable - * from ThoughtSpot. Requires ADMINISTRATION role and TENANT 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 + * (asynchronously) Delete a variable Version: 10.14.0.cl or later 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 @@ -533,13 +541,14 @@ private okhttp3.Call searchVariablesValidateBeforeCall( } /** - * Search variables Version: 10.9.0.cl or later Allows searching for variables in ThoughtSpot. - * Requires ADMINISTRATION role. 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_ONLY - Returns only - * variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values * - * EDITABLE_METADATA_AND_VALUES - Returns only editable variable metadata and values The values - * can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * Search variables Version: 10.14.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> @@ -564,13 +573,14 @@ public List searchVariables(SearchVariablesRequest searchVariablesRequ } /** - * Search variables Version: 10.9.0.cl or later Allows searching for variables in ThoughtSpot. - * Requires ADMINISTRATION role. 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_ONLY - Returns only - * variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values * - * EDITABLE_METADATA_AND_VALUES - Returns only editable variable metadata and values The values - * can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * Search variables Version: 10.14.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>> @@ -595,14 +605,14 @@ public ApiResponse> searchVariablesWithHttpInfo( } /** - * (asynchronously) Search variables Version: 10.9.0.cl or later Allows searching for variables - * in ThoughtSpot. Requires ADMINISTRATION role. 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_ONLY - - * Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata - * and values * EDITABLE_METADATA_AND_VALUES - Returns only editable variable metadata and - * values The values can be filtered by scope: * org_identifier * principal_identifier * - * model_identifier + * (asynchronously) Search variables Version: 10.14.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 @@ -643,7 +653,7 @@ public okhttp3.Call searchVariablesAsync( * * * - * + * * * * @@ -735,9 +745,10 @@ private okhttp3.Call updateVariableValidateBeforeCall( } /** - * Update a variable's properties Version: 10.9.0.cl or later Allows updating a - * variable's properties in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The - * API endpoint allows updating: * The variable name + * Update a variable's name Version: 10.14.0.cl or later Allows updating a variable's + * properties 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) @@ -747,7 +758,7 @@ private okhttp3.Call updateVariableValidateBeforeCall( *
Response Details
Status Code Description Response Headers
204 Updating the variable is successful. -
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
* * - * + * * * * @@ -760,9 +771,10 @@ public void updateVariable(String identifier, UpdateVariableRequest updateVariab } /** - * Update a variable's properties Version: 10.9.0.cl or later Allows updating a - * variable's properties in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The - * API endpoint allows updating: * The variable name + * Update a variable's name Version: 10.14.0.cl or later Allows updating a variable's + * properties 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) @@ -773,7 +785,7 @@ public void updateVariable(String identifier, UpdateVariableRequest updateVariab *
Response Details
Status Code Description Response Headers
204 Updating the variable is successful. -
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
* * - * + * * * * @@ -788,9 +800,10 @@ public ApiResponse updateVariableWithHttpInfo( } /** - * (asynchronously) Update a variable's properties Version: 10.9.0.cl or later Allows - * updating a variable's properties in ThoughtSpot. Requires ADMINISTRATION role and TENANT - * scope. The API endpoint allows updating: * The variable name + * (asynchronously) Update a variable's name Version: 10.14.0.cl or later Allows updating a + * variable's properties 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) @@ -802,7 +815,7 @@ public ApiResponse updateVariableWithHttpInfo( *
Response Details
Status Code Description Response Headers
204 Updating the variable is successful. -
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
* * - * + * * * * @@ -831,7 +844,7 @@ public okhttp3.Call updateVariableAsync( *
Response Details
Status Code Description Response Headers
204 Updating the variable is successful. -
204 Variable name updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
* * - * + * * * * @@ -857,7 +870,7 @@ public okhttp3.Call updateVariableValuesCall( Object localVarPostBody = updateVariableValuesRequest; // create path and map variables - String localVarPath = "/api/rest/2.0/template/variables/update"; + String localVarPath = "/api/rest/2.0/template/variables/update-values"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -908,16 +921,17 @@ private okhttp3.Call updateVariableValuesValidateBeforeCall( } /** - * Update values for multiple variables Version: 10.9.0.cl or later Allows updating values for - * multiple variables in ThoughtSpot. Requires ADMINISTRATION role. 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, - * CLEAR) 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. * CLEAR - - * Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later 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, CLEAR) 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. * CLEAR - 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 @@ -926,7 +940,7 @@ private okhttp3.Call updateVariableValuesValidateBeforeCall( *
Response Details
Status Code Description Response Headers
204 Updating variable values is successful. -
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
* * - * + * * * * @@ -939,16 +953,17 @@ public void updateVariableValues(UpdateVariableValuesRequest updateVariableValue } /** - * Update values for multiple variables Version: 10.9.0.cl or later Allows updating values for - * multiple variables in ThoughtSpot. Requires ADMINISTRATION role. 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, - * CLEAR) 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. * CLEAR - - * Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later 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, CLEAR) 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. * CLEAR - Removes all constrains for a given variable, scope is ignored * * @param updateVariableValuesRequest (required) * @return ApiResponse<Void> @@ -958,7 +973,7 @@ public void updateVariableValues(UpdateVariableValuesRequest updateVariableValue *
Response Details
Status Code Description Response Headers
204 Updating variable values is successful. -
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
* * - * + * * * * @@ -973,16 +988,18 @@ public ApiResponse updateVariableValuesWithHttpInfo( } /** - * (asynchronously) Update values for multiple variables Version: 10.9.0.cl or later Allows - * updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. 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, CLEAR) 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. * CLEAR - Removes all constrains for a given variable, scope is ignored + * (asynchronously) Update values for multiple variables Version: 10.14.0.cl or later 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, CLEAR) 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. * CLEAR - 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 @@ -993,7 +1010,7 @@ public ApiResponse updateVariableValuesWithHttpInfo( *
Response Details
Status Code Description Response Headers
204 Updating variable values is successful. -
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
* * - * + * * * * 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
204 Updating variable values is successful. -
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
+ * + * + * + * + * + * + * + *
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/model/ColumnSecurityRule.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRule.java index e497e73db..0a7e31fcb 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRule.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRule.java @@ -45,7 +45,7 @@ public class ColumnSecurityRule implements Serializable { @javax.annotation.Nullable private List groups; - public static final String SERIALIZED_NAME_SOURCE_TABLE_DETAILS = "sourceTableDetails"; + public static final String SERIALIZED_NAME_SOURCE_TABLE_DETAILS = "source_table_details"; @SerializedName(SERIALIZED_NAME_SOURCE_TABLE_DETAILS) @javax.annotation.Nullable @@ -188,7 +188,7 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("column"); openapiFields.add("groups"); - openapiFields.add("sourceTableDetails"); + openapiFields.add("source_table_details"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -256,10 +256,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti ; } } - // validate the optional field `sourceTableDetails` - if (jsonObj.get("sourceTableDetails") != null - && !jsonObj.get("sourceTableDetails").isJsonNull()) { - ColumnSecurityRuleSourceTable.validateJsonElement(jsonObj.get("sourceTableDetails")); + // 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")); } } 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 index 29f408406..a1461ce81 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleResponse.java @@ -33,19 +33,19 @@ public class ColumnSecurityRuleResponse implements Serializable { private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_GUID = "guid"; + public static final String SERIALIZED_NAME_TABLE_GUID = "table_guid"; - @SerializedName(SERIALIZED_NAME_GUID) + @SerializedName(SERIALIZED_NAME_TABLE_GUID) @javax.annotation.Nullable - private String guid; + private String tableGuid; - public static final String SERIALIZED_NAME_OBJ_ID = "objId"; + 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 = "columnSecurityRules"; + public static final String SERIALIZED_NAME_COLUMN_SECURITY_RULES = "column_security_rules"; @SerializedName(SERIALIZED_NAME_COLUMN_SECURITY_RULES) @javax.annotation.Nullable @@ -53,23 +53,23 @@ public class ColumnSecurityRuleResponse implements Serializable { public ColumnSecurityRuleResponse() {} - public ColumnSecurityRuleResponse guid(@javax.annotation.Nullable String guid) { - this.guid = guid; + 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 guid + * @return tableGuid */ @javax.annotation.Nullable - public String getGuid() { - return guid; + public String getTableGuid() { + return tableGuid; } - public void setGuid(@javax.annotation.Nullable String guid) { - this.guid = guid; + public void setTableGuid(@javax.annotation.Nullable String tableGuid) { + this.tableGuid = tableGuid; } public ColumnSecurityRuleResponse objId(@javax.annotation.Nullable String objId) { @@ -130,7 +130,7 @@ public boolean equals(Object o) { return false; } ColumnSecurityRuleResponse columnSecurityRuleResponse = (ColumnSecurityRuleResponse) o; - return Objects.equals(this.guid, columnSecurityRuleResponse.guid) + return Objects.equals(this.tableGuid, columnSecurityRuleResponse.tableGuid) && Objects.equals(this.objId, columnSecurityRuleResponse.objId) && Objects.equals( this.columnSecurityRules, columnSecurityRuleResponse.columnSecurityRules); @@ -147,7 +147,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(guid, objId, columnSecurityRules); + return Objects.hash(tableGuid, objId, columnSecurityRules); } private static int hashCodeNullable(JsonNullable a) { @@ -161,7 +161,7 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ColumnSecurityRuleResponse {\n"); - sb.append(" guid: ").append(toIndentedString(guid)).append("\n"); + sb.append(" tableGuid: ").append(toIndentedString(tableGuid)).append("\n"); sb.append(" objId: ").append(toIndentedString(objId)).append("\n"); sb.append(" columnSecurityRules: ") .append(toIndentedString(columnSecurityRules)) @@ -187,9 +187,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("guid"); - openapiFields.add("objId"); - openapiFields.add("columnSecurityRules"); + 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(); @@ -225,36 +225,37 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("guid") != null && !jsonObj.get("guid").isJsonNull()) - && !jsonObj.get("guid").isJsonPrimitive()) { + if ((jsonObj.get("table_guid") != null && !jsonObj.get("table_guid").isJsonNull()) + && !jsonObj.get("table_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())); + "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("objId") != null && !jsonObj.get("objId").isJsonNull()) - && !jsonObj.get("objId").isJsonPrimitive()) { + if ((jsonObj.get("obj_id") != null && !jsonObj.get("obj_id").isJsonNull()) + && !jsonObj.get("obj_id").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `objId` to be a primitive type in the JSON string" + "Expected the field `obj_id` to be a primitive type in the JSON string" + " but got `%s`", - jsonObj.get("objId").toString())); + jsonObj.get("obj_id").toString())); } - if (jsonObj.get("columnSecurityRules") != null - && !jsonObj.get("columnSecurityRules").isJsonNull()) { - JsonArray jsonArraycolumnSecurityRules = jsonObj.getAsJsonArray("columnSecurityRules"); + 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("columnSecurityRules").isJsonArray()) { + if (!jsonObj.get("column_security_rules").isJsonArray()) { throw new IllegalArgumentException( String.format( - "Expected the field `columnSecurityRules` to be an array in" + "Expected the field `column_security_rules` to be an array in" + " the JSON string but got `%s`", - jsonObj.get("columnSecurityRules").toString())); + jsonObj.get("column_security_rules").toString())); } - // validate the optional field `columnSecurityRules` (array) + // validate the optional field `column_security_rules` (array) for (int i = 0; i < jsonArraycolumnSecurityRules.size(); i++) { ColumnSecurityRule.validateJsonElement(jsonArraycolumnSecurityRules.get(i)); } 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..baee82f79 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CommunicationChannelPreferencesResponse.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.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.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +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; + } + + @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); + } + + 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); + } + + 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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CommunicationChannelPreferencesResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `CommunicationChannelPreferencesResponse` properties." + + " JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public CommunicationChannelPreferencesResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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/ConfigureCommunicationChannelPreferencesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ConfigureCommunicationChannelPreferencesRequest.java new file mode 100644 index 000000000..02ba0f849 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ConfigureCommunicationChannelPreferencesRequest.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.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.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(clusterPreferences, orgPreferences); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ConfigureCommunicationChannelPreferencesRequest.openapiFields.contains( + entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ConfigureCommunicationChannelPreferencesRequest`" + + " properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public ConfigureCommunicationChannelPreferencesRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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/CreateRoleRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateRoleRequest.java index 5477d542f..49f125710 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateRoleRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateRoleRequest.java @@ -110,6 +110,10 @@ public enum PrivilegesEnum { PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), 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 index bbd009979..1b1a5b4d9 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateUserGroupRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateUserGroupRequest.java @@ -109,6 +109,10 @@ public enum PrivilegesEnum { CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), 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 index 13346e1bb..93c20458a 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateVariableRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateVariableRequest.java @@ -5,7 +5,6 @@ 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; @@ -18,10 +17,8 @@ import com.thoughtspot.client.JSON; import java.io.IOException; import java.io.Serializable; -import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; -import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; @@ -99,17 +96,76 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @javax.annotation.Nonnull private String name; - public static final String SERIALIZED_NAME_SENSITIVE = "sensitive"; + public static final String SERIALIZED_NAME_IS_SENSITIVE = "is_sensitive"; - @SerializedName(SERIALIZED_NAME_SENSITIVE) + @SerializedName(SERIALIZED_NAME_IS_SENSITIVE) @javax.annotation.Nullable - private Boolean sensitive = false; + private Boolean isSensitive = false; - public static final String SERIALIZED_NAME_VALUES = "values"; + /** Variable Data Type */ + @JsonAdapter(DataTypeEnum.Adapter.class) + public enum DataTypeEnum { + VARCHAR("VARCHAR"), - @SerializedName(SERIALIZED_NAME_VALUES) + 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 List values; + private DataTypeEnum dataType; public CreateVariableRequest() {} @@ -151,51 +207,42 @@ public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public CreateVariableRequest sensitive(@javax.annotation.Nullable Boolean sensitive) { - this.sensitive = sensitive; + public CreateVariableRequest isSensitive(@javax.annotation.Nullable Boolean isSensitive) { + this.isSensitive = isSensitive; return this; } /** * If the variable contains sensitive values like passwords * - * @return sensitive + * @return isSensitive */ @javax.annotation.Nullable - public Boolean getSensitive() { - return sensitive; + public Boolean getIsSensitive() { + return isSensitive; } - public void setSensitive(@javax.annotation.Nullable Boolean sensitive) { - this.sensitive = sensitive; + public void setIsSensitive(@javax.annotation.Nullable Boolean isSensitive) { + this.isSensitive = isSensitive; } - public CreateVariableRequest values( - @javax.annotation.Nullable List values) { - this.values = values; - return this; - } - - public CreateVariableRequest addValuesItem(InputVariableValue valuesItem) { - if (this.values == null) { - this.values = new ArrayList<>(); - } - this.values.add(valuesItem); + public CreateVariableRequest dataType(@javax.annotation.Nullable DataTypeEnum dataType) { + this.dataType = dataType; return this; } /** - * Values of variable + * Variable Data Type * - * @return values + * @return dataType */ @javax.annotation.Nullable - public List getValues() { - return values; + public DataTypeEnum getDataType() { + return dataType; } - public void setValues(@javax.annotation.Nullable List values) { - this.values = values; + public void setDataType(@javax.annotation.Nullable DataTypeEnum dataType) { + this.dataType = dataType; } @Override @@ -209,8 +256,8 @@ public boolean equals(Object o) { CreateVariableRequest createVariableRequest = (CreateVariableRequest) o; return Objects.equals(this.type, createVariableRequest.type) && Objects.equals(this.name, createVariableRequest.name) - && Objects.equals(this.sensitive, createVariableRequest.sensitive) - && Objects.equals(this.values, createVariableRequest.values); + && Objects.equals(this.isSensitive, createVariableRequest.isSensitive) + && Objects.equals(this.dataType, createVariableRequest.dataType); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -224,7 +271,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(type, name, sensitive, values); + return Objects.hash(type, name, isSensitive, dataType); } private static int hashCodeNullable(JsonNullable a) { @@ -240,8 +287,8 @@ public String toString() { sb.append("class CreateVariableRequest {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" sensitive: ").append(toIndentedString(sensitive)).append("\n"); - sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" isSensitive: ").append(toIndentedString(isSensitive)).append("\n"); + sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -265,8 +312,8 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("type"); openapiFields.add("name"); - openapiFields.add("sensitive"); - openapiFields.add("values"); + openapiFields.add("is_sensitive"); + openapiFields.add("data_type"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -330,24 +377,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("name").toString())); } - 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++) { - InputVariableValue.validateJsonElement(jsonArrayvalues.get(i)); - } - ; - } + 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")); } } 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..1a0492b8e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequest.java @@ -0,0 +1,493 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import 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.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash( + name, description, url, urlParams, events, authentication, signatureVerification); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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"); + + // 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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateWebhookConfigurationRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `CreateWebhookConfigurationRequest` properties. JSON: %s", + entry.getKey(), jsonElement.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")); + } + } + + 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(); + elementAdapter.write(out, obj); + } + + @Override + public CreateWebhookConfigurationRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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/DeleteWebhookConfigurationsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteWebhookConfigurationsRequest.java new file mode 100644 index 000000000..227dab350 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteWebhookConfigurationsRequest.java @@ -0,0 +1,234 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.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.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(webhookIdentifiers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteWebhookConfigurationsRequest {\n"); + sb.append(" webhookIdentifiers: ") + .append(toIndentedString(webhookIdentifiers)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DeleteWebhookConfigurationsRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `DeleteWebhookConfigurationsRequest` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public DeleteWebhookConfigurationsRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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/EventChannelConfig.java b/sdks/java/src/main/java/com/thoughtspot/client/model/EventChannelConfig.java new file mode 100644 index 000000000..36d5c41e5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EventChannelConfig.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.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.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(eventType, channels); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EventChannelConfig.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `EventChannelConfig` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public EventChannelConfig read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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..38cc6fe07 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/EventChannelConfigInput.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.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(eventType, channels); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EventChannelConfigInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `EventChannelConfigInput` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public EventChannelConfigInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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/ExportOptions.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportOptions.java index 56d87383b..d848d40b9 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ExportOptions.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportOptions.java @@ -65,6 +65,13 @@ public class ExportOptions implements Serializable { @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) { @@ -172,6 +179,28 @@ public void setExportColumnSecurityRules( 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; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -188,7 +217,9 @@ public boolean equals(Object o) { this.exportWithAssociatedFeedbacks, exportOptions.exportWithAssociatedFeedbacks) && Objects.equals( - this.exportColumnSecurityRules, exportOptions.exportColumnSecurityRules); + this.exportColumnSecurityRules, exportOptions.exportColumnSecurityRules) + && Objects.equals( + this.exportWithColumnAliases, exportOptions.exportWithColumnAliases); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -207,7 +238,8 @@ public int hashCode() { includeGuid, includeObjId, exportWithAssociatedFeedbacks, - exportColumnSecurityRules); + exportColumnSecurityRules, + exportWithColumnAliases); } private static int hashCodeNullable(JsonNullable a) { @@ -230,6 +262,9 @@ public String toString() { sb.append(" exportColumnSecurityRules: ") .append(toIndentedString(exportColumnSecurityRules)) .append("\n"); + sb.append(" exportWithColumnAliases: ") + .append(toIndentedString(exportWithColumnAliases)) + .append("\n"); sb.append("}"); return sb.toString(); } @@ -256,6 +291,7 @@ private String toIndentedString(Object o) { 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(); 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 index 94092879b..90ed20522 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/GetFullAccessTokenRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GetFullAccessTokenRequest.java @@ -86,6 +86,12 @@ public class GetFullAccessTokenRequest implements Serializable { @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) { @@ -278,6 +284,29 @@ public void setGroupIdentifiers(@javax.annotation.Nullable List groupIde 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; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -296,8 +325,8 @@ public boolean equals(Object o) { && 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.groupIdentifiers, getFullAccessTokenRequest.groupIdentifiers) + && Objects.equals(this.userParameters, getFullAccessTokenRequest.userParameters); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -320,7 +349,8 @@ public int hashCode() { email, displayName, autoCreate, - groupIdentifiers); + groupIdentifiers, + userParameters); } private static int hashCodeNullable(JsonNullable a) { @@ -345,6 +375,7 @@ public String toString() { 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("}"); return sb.toString(); } @@ -375,6 +406,7 @@ private String toIndentedString(Object o) { 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(); @@ -470,6 +502,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " 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 { 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 index d0965b8d6..47e9338be 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/GetObjectAccessTokenRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GetObjectAccessTokenRequest.java @@ -92,6 +92,12 @@ public class GetObjectAccessTokenRequest implements Serializable { @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) { @@ -304,6 +310,29 @@ public void setGroupIdentifiers(@javax.annotation.Nullable List groupIde 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; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -324,7 +353,8 @@ public boolean equals(Object o) { && Objects.equals(this.displayName, getObjectAccessTokenRequest.displayName) && Objects.equals(this.autoCreate, getObjectAccessTokenRequest.autoCreate) && Objects.equals( - this.groupIdentifiers, getObjectAccessTokenRequest.groupIdentifiers); + this.groupIdentifiers, getObjectAccessTokenRequest.groupIdentifiers) + && Objects.equals(this.userParameters, getObjectAccessTokenRequest.userParameters); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -348,7 +378,8 @@ public int hashCode() { email, displayName, autoCreate, - groupIdentifiers); + groupIdentifiers, + userParameters); } private static int hashCodeNullable(JsonNullable a) { @@ -374,6 +405,7 @@ public String toString() { 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("}"); return sb.toString(); } @@ -405,6 +437,7 @@ private String toIndentedString(Object o) { 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(); @@ -509,6 +542,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " 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 { 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 index 2c5c5e2cf..82700b689 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/GroupsImportListInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/GroupsImportListInput.java @@ -111,6 +111,10 @@ public enum PrivilegesEnum { CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), 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..86cb838ad --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgChannelConfigInput.java @@ -0,0 +1,477 @@ +/* + * NOTE: This 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.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +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; + } + + @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); + } + + 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); + } + + 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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrgChannelConfigInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OrgChannelConfigInput` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public OrgChannelConfigInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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..c06636957 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgChannelConfigResponse.java @@ -0,0 +1,258 @@ +/* + * NOTE: This 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.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(org, preferences); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrgChannelConfigResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OrgChannelConfigResponse` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public OrgChannelConfigResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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..25ed7ae35 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgDetails.java @@ -0,0 +1,240 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrgDetails.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OrgDetails` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public OrgDetails read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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/OrgPreferenceSearchCriteriaInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgPreferenceSearchCriteriaInput.java new file mode 100644 index 000000000..a5fad0754 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/OrgPreferenceSearchCriteriaInput.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.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.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +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; + } + + @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); + } + + 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); + } + + 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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrgPreferenceSearchCriteriaInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OrgPreferenceSearchCriteriaInput` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public OrgPreferenceSearchCriteriaInput read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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/RoleResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/RoleResponse.java index bb57dcd7b..f3f0cb37e 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/RoleResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/RoleResponse.java @@ -135,6 +135,10 @@ public enum PrivilegesEnum { PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), 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..3f8466580 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCommunicationChannelPreferencesRequest.java @@ -0,0 +1,343 @@ +/* + * NOTE: This 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.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(clusterPreferences, orgPreferences); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchCommunicationChannelPreferencesRequest.openapiFields.contains( + entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `SearchCommunicationChannelPreferencesRequest` properties." + + " JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public SearchCommunicationChannelPreferencesRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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/SearchRoleResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchRoleResponse.java index 6545da956..4634034fe 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchRoleResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchRoleResponse.java @@ -159,6 +159,10 @@ public enum PrivilegesEnum { CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + + CAN_MODIDY_FOLDERS("CAN_MODIDY_FOLDERS"), + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), 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 index 55aed6ce0..210e488fa 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchRolesRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchRolesRequest.java @@ -140,6 +140,10 @@ public enum PrivilegesEnum { CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + + CAN_MODIDY_FOLDERS("CAN_MODIDY_FOLDERS"), + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), 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 index dd5d03157..359c6b244 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchUserGroupsRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchUserGroupsRequest.java @@ -143,6 +143,10 @@ public enum PrivilegesEnum { PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), CAN_MANAGE_WEBHOOKS("CAN_MANAGE_WEBHOOKS"), 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 index ed533edef..f59cdfa5b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchUsersRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchUsersRequest.java @@ -194,6 +194,10 @@ public enum PrivilegesEnum { PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), CAN_MANAGE_WEBHOOKS("CAN_MANAGE_WEBHOOKS"), 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 index 3842e771f..5e5846c54 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchVariablesRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchVariablesRequest.java @@ -38,6 +38,12 @@ public class SearchVariablesRequest implements Serializable { @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) @@ -55,9 +61,7 @@ public class SearchVariablesRequest implements Serializable { public enum OutputFormatEnum { METADATA_ONLY("METADATA_ONLY"), - METADATA_AND_VALUES("METADATA_AND_VALUES"), - - EDITABLE_METADATA_AND_VALUES("EDITABLE_METADATA_AND_VALUES"); + METADATA_AND_VALUES("METADATA_AND_VALUES"); private String value; @@ -140,6 +144,34 @@ public void setVariableDetails( 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; @@ -208,6 +240,7 @@ public boolean equals(Object o) { } 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.outputFormat, searchVariablesRequest.outputFormat); @@ -215,7 +248,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(variableDetails, recordOffset, recordSize, outputFormat); + return Objects.hash(variableDetails, valueScope, recordOffset, recordSize, outputFormat); } @Override @@ -223,6 +256,7 @@ 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(" outputFormat: ").append(toIndentedString(outputFormat)).append("\n"); @@ -248,6 +282,7 @@ private String toIndentedString(Object o) { // 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("output_format"); @@ -306,6 +341,25 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti ; } } + 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("output_format") != null && !jsonObj.get("output_format").isJsonNull()) && !jsonObj.get("output_format").isJsonPrimitive()) { throw new IllegalArgumentException( 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..00d4eebbc --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchWebhookConfigurationsRequest.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.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash( + orgIdentifier, webhookIdentifier, eventType, recordOffset, recordSize, sortOptions); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchWebhookConfigurationsRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `SearchWebhookConfigurationsRequest` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public SearchWebhookConfigurationsRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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/SendAgentMessageRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentMessageRequest.java new file mode 100644 index 000000000..d87e17d1b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SendAgentMessageRequest.java @@ -0,0 +1,222 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.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.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(messages); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendAgentMessageRequest {\n"); + sb.append(" messages: ").append(toIndentedString(messages)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SendAgentMessageRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `SendAgentMessageRequest` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public SendAgentMessageRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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/TokenAccessScopeObject.java b/sdks/java/src/main/java/com/thoughtspot/client/model/TokenAccessScopeObject.java index 36da2a875..aedc786fc 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/TokenAccessScopeObject.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/TokenAccessScopeObject.java @@ -34,8 +34,7 @@ public class TokenAccessScopeObject implements Serializable { /** * 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`. The `LIVEBOARD` and `ANSWER` object types are - * not supported. + * `LOGICAL_TABLE`. */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { @@ -107,8 +106,7 @@ public TokenAccessScopeObject type(@javax.annotation.Nullable TypeEnum type) { /** * 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`. The `LIVEBOARD` and `ANSWER` object types are - * not supported. + * `LOGICAL_TABLE`. * * @return type */ 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 index d29956f54..b7e2b3fa4 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateRoleRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateRoleRequest.java @@ -104,6 +104,10 @@ public enum PrivilegesEnum { CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), PREVIEW_THOUGHTSPOT_SAGE("PREVIEW_THOUGHTSPOT_SAGE"), 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 index e6580e6e4..fff20c06e 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateUserGroupRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateUserGroupRequest.java @@ -109,6 +109,10 @@ public enum PrivilegesEnum { CAN_MANAGE_ANALYST_STUDIO("CAN_MANAGE_ANALYST_STUDIO"), + CAN_MODIFY_FOLDERS("CAN_MODIFY_FOLDERS"), + + CAN_VIEW_FOLDERS("CAN_VIEW_FOLDERS"), + PREVIEW_DOCUMENT_SEARCH("PREVIEW_DOCUMENT_SEARCH"), CAN_SETUP_VERSION_CONTROL("CAN_SETUP_VERSION_CONTROL"), 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 index e0da4a43e..ed4e797fe 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateVariableRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateVariableRequest.java @@ -5,12 +5,10 @@ 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; @@ -18,9 +16,7 @@ import com.thoughtspot.client.JSON; import java.io.IOException; import java.io.Serializable; -import java.util.ArrayList; import java.util.HashSet; -import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; @@ -35,142 +31,30 @@ public class UpdateVariableRequest implements Serializable { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable + @javax.annotation.Nonnull private String name; - /** Operation to perform on the values. */ - @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 static final String SERIALIZED_NAME_VALUES = "values"; - - @SerializedName(SERIALIZED_NAME_VALUES) - @javax.annotation.Nullable - private List values; - public UpdateVariableRequest() {} - public UpdateVariableRequest name(@javax.annotation.Nullable String name) { + public UpdateVariableRequest name(@javax.annotation.Nonnull String name) { this.name = name; return this; } /** - * New name of the variable if we want to rename. + * New name of the variable. * * @return name */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getName() { return name; } - public void setName(@javax.annotation.Nullable String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public UpdateVariableRequest operation(@javax.annotation.Nullable OperationEnum operation) { - this.operation = operation; - return this; - } - - /** - * Operation to perform on the values. - * - * @return operation - */ - @javax.annotation.Nullable - public OperationEnum getOperation() { - return operation; - } - - public void setOperation(@javax.annotation.Nullable OperationEnum operation) { - this.operation = operation; - } - - public UpdateVariableRequest values( - @javax.annotation.Nullable List values) { - this.values = values; - return this; - } - - public UpdateVariableRequest addValuesItem(InputVariableValue valuesItem) { - if (this.values == null) { - this.values = new ArrayList<>(); - } - this.values.add(valuesItem); - return this; - } - - /** - * Values of variable to be updated. - * - * @return values - */ - @javax.annotation.Nullable - public List getValues() { - return values; - } - - public void setValues(@javax.annotation.Nullable List values) { - this.values = values; - } - @Override public boolean equals(Object o) { if (this == o) { @@ -180,14 +64,12 @@ public boolean equals(Object o) { return false; } UpdateVariableRequest updateVariableRequest = (UpdateVariableRequest) o; - return Objects.equals(this.name, updateVariableRequest.name) - && Objects.equals(this.operation, updateVariableRequest.operation) - && Objects.equals(this.values, updateVariableRequest.values); + return Objects.equals(this.name, updateVariableRequest.name); } @Override public int hashCode() { - return Objects.hash(name, operation, values); + return Objects.hash(name); } @Override @@ -195,8 +77,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateVariableRequest {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); - sb.append(" values: ").append(toIndentedString(values)).append("\n"); sb.append("}"); return sb.toString(); } @@ -219,11 +99,10 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("name"); - openapiFields.add("operation"); - openapiFields.add("values"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); } /** @@ -255,46 +134,24 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti entry.getKey(), jsonElement.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") != null && !jsonObj.get("name").isJsonNull()) - && !jsonObj.get("name").isJsonPrimitive()) { + 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("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("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++) { - InputVariableValue.validateJsonElement(jsonArrayvalues.get(i)); - } - ; - } - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { 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 index 3e58aa19a..d1a900292 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateVariableValuesRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateVariableValuesRequest.java @@ -10,7 +10,6 @@ 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; @@ -32,121 +31,78 @@ public class UpdateVariableValuesRequest implements Serializable { private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_VARIABLE_UPDATES = "variable_updates"; + public static final String SERIALIZED_NAME_VARIABLE_ASSIGNMENT = "variable_assignment"; - @SerializedName(SERIALIZED_NAME_VARIABLE_UPDATES) + @SerializedName(SERIALIZED_NAME_VARIABLE_ASSIGNMENT) @javax.annotation.Nonnull - private List variableUpdates; + private List variableAssignment; - /** Type of update operation */ - @JsonAdapter(OperationEnum.Adapter.class) - public enum OperationEnum { - ADD("ADD"), + public static final String SERIALIZED_NAME_VARIABLE_VALUE_SCOPE = "variable_value_scope"; - 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) + @SerializedName(SERIALIZED_NAME_VARIABLE_VALUE_SCOPE) @javax.annotation.Nonnull - private OperationEnum operation; + private List variableValueScope; public UpdateVariableValuesRequest() {} - public UpdateVariableValuesRequest variableUpdates( - @javax.annotation.Nonnull List variableUpdates) { - this.variableUpdates = variableUpdates; + public UpdateVariableValuesRequest variableAssignment( + @javax.annotation.Nonnull List variableAssignment) { + this.variableAssignment = variableAssignment; return this; } - public UpdateVariableValuesRequest addVariableUpdatesItem( - VariableValueInput variableUpdatesItem) { - if (this.variableUpdates == null) { - this.variableUpdates = new ArrayList<>(); + public UpdateVariableValuesRequest addVariableAssignmentItem( + VariableUpdateAssignmentInput variableAssignmentItem) { + if (this.variableAssignment == null) { + this.variableAssignment = new ArrayList<>(); } - this.variableUpdates.add(variableUpdatesItem); + this.variableAssignment.add(variableAssignmentItem); return this; } /** - * Variables and values + * Variables and values to update * - * @return variableUpdates + * @return variableAssignment */ @javax.annotation.Nonnull - public List getVariableUpdates() { - return variableUpdates; + public List getVariableAssignment() { + return variableAssignment; } - public void setVariableUpdates( - @javax.annotation.Nonnull List variableUpdates) { - this.variableUpdates = variableUpdates; + public void setVariableAssignment( + @javax.annotation.Nonnull List variableAssignment) { + this.variableAssignment = variableAssignment; } - public UpdateVariableValuesRequest operation( - @javax.annotation.Nonnull OperationEnum operation) { - this.operation = operation; + 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; } /** - * Type of update operation + * Variables and values to update * - * @return operation + * @return variableValueScope */ @javax.annotation.Nonnull - public OperationEnum getOperation() { - return operation; + public List getVariableValueScope() { + return variableValueScope; } - public void setOperation(@javax.annotation.Nonnull OperationEnum operation) { - this.operation = operation; + public void setVariableValueScope( + @javax.annotation.Nonnull List variableValueScope) { + this.variableValueScope = variableValueScope; } @Override @@ -158,21 +114,27 @@ public boolean equals(Object o) { return false; } UpdateVariableValuesRequest updateVariableValuesRequest = (UpdateVariableValuesRequest) o; - return Objects.equals(this.variableUpdates, updateVariableValuesRequest.variableUpdates) - && Objects.equals(this.operation, updateVariableValuesRequest.operation); + return Objects.equals( + this.variableAssignment, updateVariableValuesRequest.variableAssignment) + && Objects.equals( + this.variableValueScope, updateVariableValuesRequest.variableValueScope); } @Override public int hashCode() { - return Objects.hash(variableUpdates, operation); + return Objects.hash(variableAssignment, variableValueScope); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateVariableValuesRequest {\n"); - sb.append(" variableUpdates: ").append(toIndentedString(variableUpdates)).append("\n"); - sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append(" variableAssignment: ") + .append(toIndentedString(variableAssignment)) + .append("\n"); + sb.append(" variableValueScope: ") + .append(toIndentedString(variableValueScope)) + .append("\n"); sb.append("}"); return sb.toString(); } @@ -194,13 +156,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("variable_updates"); - openapiFields.add("operation"); + openapiFields.add("variable_assignment"); + openapiFields.add("variable_value_scope"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("variable_updates"); - openapiRequiredFields.add("operation"); + openapiRequiredFields.add("variable_assignment"); + openapiRequiredFields.add("variable_value_scope"); } /** @@ -245,29 +207,35 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the json data is an array - if (!jsonObj.get("variable_updates").isJsonArray()) { + if (!jsonObj.get("variable_assignment").isJsonArray()) { throw new IllegalArgumentException( String.format( - "Expected the field `variable_updates` to be an array in the JSON" + "Expected the field `variable_assignment` to be an array in the JSON" + " string but got `%s`", - jsonObj.get("variable_updates").toString())); + jsonObj.get("variable_assignment").toString())); } - JsonArray jsonArrayvariableUpdates = jsonObj.getAsJsonArray("variable_updates"); - // validate the required field `variable_updates` (array) - for (int i = 0; i < jsonArrayvariableUpdates.size(); i++) { - VariableValueInput.validateJsonElement(jsonArrayvariableUpdates.get(i)); + 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)); } ; - if (!jsonObj.get("operation").isJsonPrimitive()) { + // ensure the json data is an array + if (!jsonObj.get("variable_value_scope").isJsonArray()) { throw new IllegalArgumentException( String.format( - "Expected the field `operation` to be a primitive type in the JSON" + "Expected the field `variable_value_scope` to be an array in the JSON" + " string but got `%s`", - jsonObj.get("operation").toString())); + jsonObj.get("variable_value_scope").toString())); } - // validate the required field `operation` - OperationEnum.validateJsonElement(jsonObj.get("operation")); + + 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 { 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..3e565dca5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequest.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.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash( + name, description, url, urlParams, events, authentication, signatureVerification); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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"); + + // 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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateWebhookConfigurationRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `UpdateWebhookConfigurationRequest` properties. JSON: %s", + entry.getKey(), 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("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")); + } + } + + 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(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateWebhookConfigurationRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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 index 910088678..c6a33c13b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/User.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/User.java @@ -531,6 +531,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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) { @@ -1448,6 +1454,25 @@ public void setAccessControlProperties( 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; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -1502,7 +1527,8 @@ public boolean equals(Object o) { && 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.accessControlProperties, user.accessControlProperties) + && Objects.equals(this.variableValues, user.variableValues); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -1561,7 +1587,8 @@ public int hashCode() { extendedProperties, extendedPreferences, userParameters, - accessControlProperties); + accessControlProperties, + variableValues); } private static int hashCodeNullable(JsonNullable a) { @@ -1644,6 +1671,7 @@ public String toString() { sb.append(" accessControlProperties: ") .append(toIndentedString(accessControlProperties)) .append("\n"); + sb.append(" variableValues: ").append(toIndentedString(variableValues)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1710,6 +1738,7 @@ private String toIndentedString(Object o) { 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(); 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 index a80f08bab..c4f18f141 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UserObject.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UserObject.java @@ -34,8 +34,7 @@ public class UserObject implements Serializable { /** * 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`. The `LIVEBOARD` and `ANSWER` object types are - * not supported. + * `LOGICAL_TABLE`. */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { @@ -107,8 +106,7 @@ public UserObject type(@javax.annotation.Nullable TypeEnum type) { /** * 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`. The `LIVEBOARD` and `ANSWER` object types are - * not supported. + * `LOGICAL_TABLE`. * * @return type */ 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..c3020fd58 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ValueScopeInput.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.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.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Input for variable scope in search */ +@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; + + /** 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 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; + } + + /** + * Principal type + * + * @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; + } + + /** + * Model Identifier + * + * @return modelIdentifier + */ + @javax.annotation.Nullable + public String getModelIdentifier() { + return modelIdentifier; + } + + public void setModelIdentifier(@javax.annotation.Nullable String modelIdentifier) { + this.modelIdentifier = modelIdentifier; + } + + @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); + } + + 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); + } + + 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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ValueScopeInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ValueScopeInput` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public ValueScopeInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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/VariableUpdateAssignmentInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableUpdateAssignmentInput.java new file mode 100644 index 000000000..b687002fc --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableUpdateAssignmentInput.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.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.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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"), + + CLEAR("CLEAR"); + + 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(variableIdentifier, variableValues, operation); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!VariableUpdateAssignmentInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `VariableUpdateAssignmentInput` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public VariableUpdateAssignmentInput read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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..a16e79291 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableUpdateScopeInput.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.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import org.openapitools.jackson.nullable.JsonNullable; + +/** 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 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; + + /** 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 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; + } + + /** + * Principal type + * + * @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 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 VariableUpdateScopeInput 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; + } + + @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); + } + + 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); + } + + 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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!VariableUpdateScopeInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `VariableUpdateScopeInput` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public VariableUpdateScopeInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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 index bc7cd2c78..617ef30eb 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/VariableValue.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableValue.java @@ -17,8 +17,10 @@ import com.thoughtspot.client.JSON; import java.io.IOException; import java.io.Serializable; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; @@ -37,6 +39,12 @@ public class VariableValue implements Serializable { @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) @@ -133,6 +141,33 @@ 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; @@ -221,6 +256,7 @@ public boolean equals(Object o) { } 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) @@ -238,7 +274,8 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(value, orgIdentifier, principalType, principalIdentifier, priority); + return Objects.hash( + value, valueList, orgIdentifier, principalType, principalIdentifier, priority); } private static int hashCodeNullable(JsonNullable a) { @@ -253,6 +290,7 @@ 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: ") @@ -281,6 +319,7 @@ private String toIndentedString(Object o) { // 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"); @@ -339,6 +378,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " 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( 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..3e14a00c6 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthApiKey.java @@ -0,0 +1,242 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(key, value); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookAuthApiKey.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `WebhookAuthApiKey` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookAuthApiKey read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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..0583dcd8d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthApiKeyInput.java @@ -0,0 +1,242 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(key, value); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookAuthApiKeyInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `WebhookAuthApiKeyInput` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookAuthApiKeyInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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..34873211c --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthBasicAuth.java @@ -0,0 +1,242 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(username, password); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookAuthBasicAuth.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `WebhookAuthBasicAuth` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookAuthBasicAuth read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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..449957425 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthBasicAuthInput.java @@ -0,0 +1,243 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(username, password); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookAuthBasicAuthInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `WebhookAuthBasicAuthInput` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookAuthBasicAuthInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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..1aa24e21c --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthOAuth2.java @@ -0,0 +1,278 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(authorizationUrl, clientId, clientSecret); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookAuthOAuth2.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `WebhookAuthOAuth2` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookAuthOAuth2 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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..6abd6e303 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthOAuth2Input.java @@ -0,0 +1,279 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(authorizationUrl, clientId, clientSecret); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookAuthOAuth2Input.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `WebhookAuthOAuth2Input` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookAuthOAuth2Input read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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..a65454ed5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthentication.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.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +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; + } + + @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); + } + + 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); + } + + 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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookAuthentication.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `WebhookAuthentication` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookAuthentication read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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..4a93743cf --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookAuthenticationInput.java @@ -0,0 +1,314 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.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.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +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; + } + + @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); + } + + 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); + } + + 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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookAuthenticationInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `WebhookAuthenticationInput` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookAuthenticationInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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..0e60d39e8 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookDeleteFailure.java @@ -0,0 +1,278 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, error); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookDeleteFailure.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `WebhookDeleteFailure` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookDeleteFailure read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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..9a347d034 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookDeleteResponse.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.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.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(deletedCount, failedCount, deletedWebhooks, failedWebhooks); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookDeleteResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `WebhookDeleteResponse` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookDeleteResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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/WebhookOrg.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookOrg.java new file mode 100644 index 000000000..f9fdc7def --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookOrg.java @@ -0,0 +1,240 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookOrg.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `WebhookOrg` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookOrg read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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..2502067dd --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookPagination.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.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(recordOffset, recordSize, totalCount, hasMore); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookPagination.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `WebhookPagination` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookPagination read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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..f5e3c12c3 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookResponse.java @@ -0,0 +1,708 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import 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.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +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_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 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 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; + } + + @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.creationTimeInMillis, webhookResponse.creationTimeInMillis) + && Objects.equals( + this.modificationTimeInMillis, webhookResponse.modificationTimeInMillis) + && Objects.equals(this.createdBy, webhookResponse.createdBy) + && Objects.equals(this.lastModifiedBy, webhookResponse.lastModifiedBy); + } + + 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, + creationTimeInMillis, + modificationTimeInMillis, + createdBy, + lastModifiedBy); + } + + 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(" 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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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("creation_time_in_millis"); + openapiFields.add("modification_time_in_millis"); + openapiFields.add("created_by"); + openapiFields.add("last_modified_by"); + + // 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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `WebhookResponse` properties. JSON: %s", + entry.getKey(), jsonElement.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")); + } + // 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")); + } + } + + 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(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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..abccfd679 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookSearchResponse.java @@ -0,0 +1,258 @@ +/* + * NOTE: This 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.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(webhooks, pagination); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookSearchResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `WebhookSearchResponse` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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..febdba75a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookSignatureVerification.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.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(type, header, algorithm, secret); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookSignatureVerification.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `WebhookSignatureVerification` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookSignatureVerification read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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..f2a5442db --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookSignatureVerificationInput.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.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.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(type, header, algorithm, secret); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookSignatureVerificationInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `WebhookSignatureVerificationInput` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookSignatureVerificationInput read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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..45d549fe3 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookSortOptionsInput.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.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.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +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; + } + + @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); + } + + 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); + } + + 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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookSortOptionsInput.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `WebhookSortOptionsInput` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookSortOptionsInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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..f574db37f --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookUser.java @@ -0,0 +1,241 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** 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; + } + + @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); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\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())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WebhookUser.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `WebhookUser` properties. JSON: %s", + entry.getKey(), jsonElement.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(); + elementAdapter.write(out, obj); + } + + @Override + public WebhookUser read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.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 index 43823f626..f65efa442 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/AiApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/AiApiTest.java @@ -16,6 +16,7 @@ import com.thoughtspot.client.model.GetRelevantQuestionsRequest; import com.thoughtspot.client.model.QueryGetDecomposedQueryRequest; import com.thoughtspot.client.model.ResponseMessage; +import com.thoughtspot.client.model.SendAgentMessageRequest; import com.thoughtspot.client.model.SendAgentMessageResponse; import com.thoughtspot.client.model.SendAgentMessageStreamingRequest; import com.thoughtspot.client.model.SendMessageRequest; @@ -133,6 +134,31 @@ public void queryGetDecomposedQueryTest() throws ApiException { // TODO: test validations } + /** + * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) + * conversation by submitting one or more natural language messages. To use this API, the user + * must have access to the relevant conversational session (via conversation_identifier) and + * submit at least one message. #### Usage guidelines To initiate or continue a conversation, + * the request must include: - `conversation_identifier`: a unique session ID for + * continuity and message tracking - `messages`: an array of one or more text + * messages, each with a value and type The API returns a array of object with a type, message, + * and metadata. - `type`: Type of the message — text, answer, or error. - + * `message`: Main content of the response. - `metadata`: Additional info + * depending on the message type. > ###### 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 sendAgentMessageTest() throws ApiException { + String conversationIdentifier = null; + SendAgentMessageRequest sendAgentMessageRequest = null; + Object response = api.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest); + // TODO: test validations + } + /** * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) * conversation by submitting one or more natural language messages. To use this API, the user 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 index a493a0e0f..09107fc34 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/AuthenticationApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/AuthenticationApiTest.java @@ -86,8 +86,7 @@ public void getCurrentUserTokenTest() throws ApiException { * persist on a specific set of objects for user sessions initiated using the token. Once * defined, the rules are added to the user's `access_control_properties` object, * after which all sessions will use the persisted values. Specify the object type as - * `LOGICAL_TABLE`. The `LIVEBOARD` and `ANSWER` object types are - * not supported. For more information, see [ABAC via tokens + * `LOGICAL_TABLE`. For more information, see [ABAC via tokens * Documentation](https://developers.thoughtspot.com/docs/api-authv2#_get_tokens_with_custom_rules_and_filter_conditions). * ##### Just-in-time provisioning For just-in-time user creation and provisioning, define the * following attributes: * `auto_create` * `username` * @@ -95,7 +94,9 @@ public void getCurrentUserTokenTest() throws ApiException { * 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` in the * API request, the user properties such as the display name, email, Org and group assignment - * will not be updated with new values. For more information, see [Just-in-time + * will not be updated with new values. If `auto_create` is set to `true`, + * it won't create formula variables and hence won't be applicable for + * `variable_values`. For more information, see [Just-in-time * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). ##### * Important point to note All options in the token creation APIs that define access to the * content in ThoughtSpot will do so during the token creation and not when the token is being @@ -103,7 +104,13 @@ public void getCurrentUserTokenTest() throws ApiException { * the authentication token is created. Persist options such as `APPEND`, * `REPLACE`, `RESET` will persist security parameters on the user profile * when the token is created, while Persist option `NONE` will not persist anything - * but will be honoured in the session. + * but will be honoured in the session. ##### Formula Variables Before using variables_values, + * variables must be created using Create Variable API with type as Formula_Variable + * (/api/rest/2.0/template/variables/create) The persist_option RESET and NONE cannot be used + * when variable_values are provided in the request. If you are working with variable_values, + * you must use other (APPEND, REPLACE) supported modes. If you want to use RESET or NONE, do + * not pass any variable_values. In such cases, variable_values will remain unaffected. When + * using object_id with variable_values, models are supported. * * @throws ApiException if the Api call fails */ 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 index 8c973cf2c..664bfbe7e 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/ConnectionsApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/ConnectionsApiTest.java @@ -272,31 +272,71 @@ public void updateConnectionTest() throws ApiException { * 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: ``` { - * \"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\" } ] } ] } ] } ] } ``` 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` 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\", 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 index 3d250f153..becca5066 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/DbtApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/DbtApiTest.java @@ -101,15 +101,15 @@ public void dbtGenerateSyncTmlTest() throws ApiException { @Test public void dbtGenerateTmlTest() throws ApiException { String dbtConnectionIdentifier = null; - String importWorksheets = null; String modelTables = null; + String importWorksheets = null; String worksheets = null; File fileContent = null; Object response = api.dbtGenerateTml( dbtConnectionIdentifier, - importWorksheets, modelTables, + importWorksheets, worksheets, fileContent); // 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 index db0e788a1..aaf93d4d1 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/MetadataApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/MetadataApiTest.java @@ -83,9 +83,9 @@ public void convertWorksheetToModelTest() throws ApiException { } /** - * Makes a copy of an Answer or Liveboard saved in Atlas 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 + * 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 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 index 0873ed8be..c4dcfb2e0 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/SystemApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/SystemApiTest.java @@ -5,6 +5,9 @@ package com.thoughtspot.client.api; import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.CommunicationChannelPreferencesResponse; +import com.thoughtspot.client.model.ConfigureCommunicationChannelPreferencesRequest; +import com.thoughtspot.client.model.SearchCommunicationChannelPreferencesRequest; import com.thoughtspot.client.model.SystemConfig; import com.thoughtspot.client.model.SystemInfo; import com.thoughtspot.client.model.SystemOverrideInfo; @@ -18,6 +21,29 @@ 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: 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. @@ -67,6 +93,30 @@ public void getSystemOverrideInfoTest() throws ApiException { // 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 Updates the current configuration of the cluster. You must send * the configuration data in JSON format. Requires `ADMINISTRATION` (**Can administer 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 index 7edde0897..ea6e238bc 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/ThoughtSpotRestApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/ThoughtSpotRestApiTest.java @@ -17,6 +17,8 @@ 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.ConfigureCommunicationChannelPreferencesRequest; import com.thoughtspot.client.model.ConnectionConfigurationResponse; import com.thoughtspot.client.model.ConnectionConfigurationSearchRequest; import com.thoughtspot.client.model.Conversation; @@ -39,6 +41,7 @@ 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.DeleteConfigRequest; @@ -46,6 +49,7 @@ import com.thoughtspot.client.model.DeleteConnectionRequest; import com.thoughtspot.client.model.DeleteMetadataRequest; import com.thoughtspot.client.model.DeleteOrgEmailCustomizationRequest; +import com.thoughtspot.client.model.DeleteWebhookConfigurationsRequest; import com.thoughtspot.client.model.DeployCommitRequest; import com.thoughtspot.client.model.DeployResponse; import com.thoughtspot.client.model.EurekaDataSourceSuggestionResponse; @@ -105,6 +109,7 @@ import com.thoughtspot.client.model.RoleResponse; import com.thoughtspot.client.model.SearchCalendarsRequest; 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; @@ -121,6 +126,8 @@ 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.SendAgentMessageRequest; import com.thoughtspot.client.model.SendAgentMessageResponse; import com.thoughtspot.client.model.SendAgentMessageStreamingRequest; import com.thoughtspot.client.model.SendMessageRequest; @@ -154,11 +161,15 @@ 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.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; @@ -250,6 +261,29 @@ public void commitBranchTest() throws ApiException { // 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: 10.12.0.cl or later Gets connection configuration objects. Requires * `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection @@ -318,9 +352,9 @@ public void convertWorksheetToModelTest() throws ApiException { } /** - * Makes a copy of an Answer or Liveboard saved in Atlas 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 + * 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 @@ -722,17 +756,18 @@ public void createUserGroupTest() throws ApiException { } /** - * Create a variable which can be used for parameterizing metadata objects Version: 10.9.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 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 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 fomula variables - * (defaults to null) The operation will fail if: * The user lacks required permissions * The - * variable name already exists * The variable type is invalid + * Create a variable which can be used for parameterizing metadata objects Version: 10.14.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 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 fomula + * 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 */ @@ -743,6 +778,25 @@ public void createVariableTest() throws ApiException { // 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 @@ -827,15 +881,15 @@ public void dbtGenerateSyncTmlTest() throws ApiException { @Test public void dbtGenerateTmlTest() throws ApiException { String dbtConnectionIdentifier = null; - String importWorksheets = null; String modelTables = null; + String importWorksheets = null; String worksheets = null; File fileContent = null; Object response = api.dbtGenerateTml( dbtConnectionIdentifier, - importWorksheets, modelTables, + importWorksheets, worksheets, fileContent); // TODO: test validations @@ -1161,10 +1215,11 @@ public void deleteUserGroupTest() throws ApiException { } /** - * Delete a variable Version: 10.9.0.cl or later Allows deleting a variable from ThoughtSpot. - * Requires ADMINISTRATION role and TENANT 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 + * Delete a variable Version: 10.14.0.cl or later 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 */ @@ -1175,6 +1230,25 @@ public void deleteVariableTest() throws ApiException { // 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 @@ -1673,8 +1747,7 @@ public void getCurrentUserTokenTest() throws ApiException { * persist on a specific set of objects for user sessions initiated using the token. Once * defined, the rules are added to the user's `access_control_properties` object, * after which all sessions will use the persisted values. Specify the object type as - * `LOGICAL_TABLE`. The `LIVEBOARD` and `ANSWER` object types are - * not supported. For more information, see [ABAC via tokens + * `LOGICAL_TABLE`. For more information, see [ABAC via tokens * Documentation](https://developers.thoughtspot.com/docs/api-authv2#_get_tokens_with_custom_rules_and_filter_conditions). * ##### Just-in-time provisioning For just-in-time user creation and provisioning, define the * following attributes: * `auto_create` * `username` * @@ -1682,7 +1755,9 @@ public void getCurrentUserTokenTest() throws ApiException { * 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` in the * API request, the user properties such as the display name, email, Org and group assignment - * will not be updated with new values. For more information, see [Just-in-time + * will not be updated with new values. If `auto_create` is set to `true`, + * it won't create formula variables and hence won't be applicable for + * `variable_values`. For more information, see [Just-in-time * provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning). ##### * Important point to note All options in the token creation APIs that define access to the * content in ThoughtSpot will do so during the token creation and not when the token is being @@ -1690,7 +1765,13 @@ public void getCurrentUserTokenTest() throws ApiException { * the authentication token is created. Persist options such as `APPEND`, * `REPLACE`, `RESET` will persist security parameters on the user profile * when the token is created, while Persist option `NONE` will not persist anything - * but will be honoured in the session. + * but will be honoured in the session. ##### Formula Variables Before using variables_values, + * variables must be created using Create Variable API with type as Formula_Variable + * (/api/rest/2.0/template/variables/create) The persist_option RESET and NONE cannot be used + * when variable_values are provided in the request. If you are working with variable_values, + * you must use other (APPEND, REPLACE) supported modes. If you want to use RESET or NONE, do + * not pass any variable_values. In such cases, variable_values will remain unaffected. When + * using object_id with variable_values, models are supported. * * @throws ApiException if the Api call fails */ @@ -2163,6 +2244,30 @@ public void searchCommitsTest() throws ApiException { // 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 @@ -2464,13 +2569,14 @@ public void searchUsersTest() throws ApiException { } /** - * Search variables Version: 10.9.0.cl or later Allows searching for variables in ThoughtSpot. - * Requires ADMINISTRATION role. 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_ONLY - Returns only - * variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values * - * EDITABLE_METADATA_AND_VALUES - Returns only editable variable metadata and values The values - * can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * Search variables Version: 10.14.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 */ @@ -2481,6 +2587,51 @@ public void searchVariablesTest() throws ApiException { // 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.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) + * conversation by submitting one or more natural language messages. To use this API, the user + * must have access to the relevant conversational session (via conversation_identifier) and + * submit at least one message. #### Usage guidelines To initiate or continue a conversation, + * the request must include: - `conversation_identifier`: a unique session ID for + * continuity and message tracking - `messages`: an array of one or more text + * messages, each with a value and type The API returns a array of object with a type, message, + * and metadata. - `type`: Type of the message — text, answer, or error. - + * `message`: Main content of the response. - `metadata`: Additional info + * depending on the message type. > ###### 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 sendAgentMessageTest() throws ApiException { + String conversationIdentifier = null; + SendAgentMessageRequest sendAgentMessageRequest = null; + Object response = api.sendAgentMessage(conversationIdentifier, sendAgentMessageRequest); + // TODO: test validations + } + /** * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) * conversation by submitting one or more natural language messages. To use this API, the user @@ -2805,31 +2956,71 @@ public void updateConnectionConfigurationTest() throws ApiException { * 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: ``` { - * \"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\" } ] } ] } ] } ] } ``` 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` 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\", @@ -3169,9 +3360,10 @@ public void updateUserGroupTest() throws ApiException { } /** - * Update a variable's properties Version: 10.9.0.cl or later Allows updating a - * variable's properties in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The - * API endpoint allows updating: * The variable name + * Update a variable's name Version: 10.14.0.cl or later Allows updating a variable's + * properties 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 */ @@ -3184,16 +3376,17 @@ public void updateVariableTest() throws ApiException { } /** - * Update values for multiple variables Version: 10.9.0.cl or later Allows updating values for - * multiple variables in ThoughtSpot. Requires ADMINISTRATION role. 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, - * CLEAR) 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. * CLEAR - - * Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later 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, CLEAR) 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. * CLEAR - Removes all constrains for a given variable, scope is ignored * * @throws ApiException if the Api call fails */ @@ -3204,6 +3397,24 @@ public void updateVariableValuesTest() throws ApiException { // 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: 10.10.0.cl or later Validates the email customization configuration if any set for * the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer 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 index 18528740a..aed5e4ede 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/VariableApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/VariableApiTest.java @@ -21,17 +21,18 @@ public class VariableApiTest { private final VariableApi api = new VariableApi(); /** - * Create a variable which can be used for parameterizing metadata objects Version: 10.9.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 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 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 fomula variables - * (defaults to null) The operation will fail if: * The user lacks required permissions * The - * variable name already exists * The variable type is invalid + * Create a variable which can be used for parameterizing metadata objects Version: 10.14.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 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 fomula + * 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 */ @@ -43,10 +44,11 @@ public void createVariableTest() throws ApiException { } /** - * Delete a variable Version: 10.9.0.cl or later Allows deleting a variable from ThoughtSpot. - * Requires ADMINISTRATION role and TENANT 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 + * Delete a variable Version: 10.14.0.cl or later 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 */ @@ -58,13 +60,14 @@ public void deleteVariableTest() throws ApiException { } /** - * Search variables Version: 10.9.0.cl or later Allows searching for variables in ThoughtSpot. - * Requires ADMINISTRATION role. 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_ONLY - Returns only - * variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values * - * EDITABLE_METADATA_AND_VALUES - Returns only editable variable metadata and values The values - * can be filtered by scope: * org_identifier * principal_identifier * model_identifier + * Search variables Version: 10.14.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 */ @@ -76,9 +79,10 @@ public void searchVariablesTest() throws ApiException { } /** - * Update a variable's properties Version: 10.9.0.cl or later Allows updating a - * variable's properties in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The - * API endpoint allows updating: * The variable name + * Update a variable's name Version: 10.14.0.cl or later Allows updating a variable's + * properties 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 */ @@ -91,16 +95,17 @@ public void updateVariableTest() throws ApiException { } /** - * Update values for multiple variables Version: 10.9.0.cl or later Allows updating values for - * multiple variables in ThoughtSpot. Requires ADMINISTRATION role. 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, - * CLEAR) 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. * CLEAR - - * Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later 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, CLEAR) 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. * CLEAR - Removes all constrains for a given variable, scope is ignored * * @throws ApiException if the Api call fails */ 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/ColumnSecurityRuleResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleResponseTest.java index 60300674e..d2f530313 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleResponseTest.java @@ -16,10 +16,10 @@ public void testColumnSecurityRuleResponse() { // TODO: test ColumnSecurityRuleResponse } - /** Test the property 'guid' */ + /** Test the property 'tableGuid' */ @Test - public void guidTest() { - // TODO: test guid + public void tableGuidTest() { + // TODO: test tableGuid } /** Test the property 'objId' */ 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/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/CreateVariableRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateVariableRequestTest.java index 8378b84b6..4654faa97 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateVariableRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateVariableRequestTest.java @@ -28,15 +28,15 @@ public void nameTest() { // TODO: test name } - /** Test the property 'sensitive' */ + /** Test the property 'isSensitive' */ @Test - public void sensitiveTest() { - // TODO: test sensitive + public void isSensitiveTest() { + // TODO: test isSensitive } - /** Test the property 'values' */ + /** Test the property 'dataType' */ @Test - public void valuesTest() { - // TODO: test values + 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..c2dbe71d7 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequestTest.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 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 + } +} 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/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/ExportOptionsTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportOptionsTest.java index 057af2d7f..6ce8ef180 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/ExportOptionsTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ExportOptionsTest.java @@ -45,4 +45,10 @@ public void exportWithAssociatedFeedbacksTest() { 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/GetFullAccessTokenRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GetFullAccessTokenRequestTest.java index 75ef7b4f6..46df6bf17 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/GetFullAccessTokenRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GetFullAccessTokenRequestTest.java @@ -69,4 +69,10 @@ public void autoCreateTest() { 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/GetObjectAccessTokenRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/GetObjectAccessTokenRequestTest.java index 6618c81f0..6d4882569 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/GetObjectAccessTokenRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/GetObjectAccessTokenRequestTest.java @@ -75,4 +75,10 @@ public void autoCreateTest() { 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/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/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/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/SearchVariablesRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchVariablesRequestTest.java index 860f01936..bc7c11024 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchVariablesRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchVariablesRequestTest.java @@ -22,6 +22,12 @@ 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() { 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/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/UpdateVariableRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateVariableRequestTest.java index ae5eb5929..2494b8b1b 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateVariableRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateVariableRequestTest.java @@ -21,16 +21,4 @@ public void testUpdateVariableRequest() { public void nameTest() { // TODO: test name } - - /** Test the property 'operation' */ - @Test - public void operationTest() { - // TODO: test operation - } - - /** Test the property 'values' */ - @Test - public void valuesTest() { - // TODO: test values - } } 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 index 047557e79..37b223614 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateVariableValuesRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateVariableValuesRequestTest.java @@ -16,15 +16,15 @@ public void testUpdateVariableValuesRequest() { // TODO: test UpdateVariableValuesRequest } - /** Test the property 'variableUpdates' */ + /** Test the property 'variableAssignment' */ @Test - public void variableUpdatesTest() { - // TODO: test variableUpdates + public void variableAssignmentTest() { + // TODO: test variableAssignment } - /** Test the property 'operation' */ + /** Test the property 'variableValueScope' */ @Test - public void operationTest() { - // TODO: test operation + 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..4f08d03dd --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequestTest.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 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 + } +} 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 index 5176115d1..d0d27f333 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UserTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UserTest.java @@ -285,4 +285,10 @@ public void userParametersTest() { 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/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/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 index 8b761e21a..10bf3f756 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/VariableValueTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/VariableValueTest.java @@ -22,6 +22,12 @@ 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() { 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/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..3c861fa0b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookResponseTest.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 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 '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 + } +} 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 + } +}